BizTalk Server General - BTS 2004 Rule Engine - .NET class create instance

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2004 > BTS 2004 Rule Engine - .NET class create instance





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author BTS 2004 Rule Engine - .NET class create instance
inukshuk

2004-08-22, 5:58 pm

I have a call rules shape in my orchestration and have created an instance of
this class which implements the IFactCreator interface.
I then get my object in the dropdown list when i configure my call rules
shape and select it as a paramter.
When i run my orchestration and I get to the call rules shape i always get
an exception of type:: Object reference not set to an instance of an object.
These rules work like a charm from the test policy option when i create the
object in the fact creator section. But from my orchestration i get the
object reference exception.

Can anyone help.....
Matt Milner

2004-08-23, 5:50 pm

you don't need a fact creator in the orchestration, you need to create the
facts and add them as parameters. for example, if you have a component
named MyComponent, you wouldn't add a fact creator to the orchestration,
just a variable of type MyComponent. Initialize it before using it as a
parameter to the call rules shape. The IFactCreator interface is for
testing your policies in the business rules composer.

Matt


"inukshuk" <inukshuk@discussions.microsoft.com> wrote in message
news:4903174E-EC74-414E-94BF-3798237FE131@microsoft.com...
> I have a call rules shape in my orchestration and have created an instance

of
> this class which implements the IFactCreator interface.
> I then get my object in the dropdown list when i configure my call rules
> shape and select it as a paramter.
> When i run my orchestration and I get to the call rules shape i always get
> an exception of type:: Object reference not set to an instance of an

object.
> These rules work like a charm from the test policy option when i create

the
> object in the fact creator section. But from my orchestration i get the
> object reference exception.
>
> Can anyone help.....



Makarand Keer

2004-11-09, 5:49 pm

Hi Matt

I have similar requirement.
I am using SDK to invoke RuleEngine.Execute method to apply the rules on
XMLDocument.
Now when for record where Business Rule is applied i am updating DateTime
element of same xml. To get the current datetime I have written class and
added the assembly in GAC. From Rule Composer while designing Policy I can
assign the static method of this class to my element in Action, however when
I test the policy thr' coposer it is not working also when I run my code to
invoke RuleEngine.Execute it is not working. No errors are shown.
Am i missing something here, do I have to add class as fact in sdk, if yes
my class have private cinstructor so how to add instance of this class in
fact.

Please help

Makarand


"Matt Milner" wrote:

> you don't need a fact creator in the orchestration, you need to create the
> facts and add them as parameters. for example, if you have a component
> named MyComponent, you wouldn't add a fact creator to the orchestration,
> just a variable of type MyComponent. Initialize it before using it as a
> parameter to the call rules shape. The IFactCreator interface is for
> testing your policies in the business rules composer.
>
> Matt
>
>
> "inukshuk" <inukshuk@discussions.microsoft.com> wrote in message
> news:4903174E-EC74-414E-94BF-3798237FE131@microsoft.com...
> of
> object.
> the
>
>
>

Alvaro Miranda [MSFT]

2004-11-11, 5:49 pm

The rule engine requires that you assert a fact of your .NET type even if
the method you call is static. So you may have to provide a public
constructor in your class.

--------------------[vbcol=seagreen]
<MakarandKeer@discussions.microsoft.com>[vbcol=seagreen]
<OYFKmEWiEHA.1040@TK2MSFTNGP09.phx.gbl>[vbcol=seagreen]
can[vbcol=seagreen]
when[vbcol=seagreen]
to[vbcol=seagreen]
yes[vbcol=seagreen]
the[vbcol=seagreen]
instance[vbcol=seagreen]
rules[vbcol=seagreen]
always get[vbcol=seagreen]
create[vbcol=seagreen]
the[vbcol=seagreen]

This posting is provided "AS IS" with no warranties, and confers no rights.

EBusiness Server Team

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com