BTS 2004 Rule Engine - .NET class create instance
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > BTS 2004 Rule Engine - .NET class create instance




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    BTS 2004 Rule Engine - .NET class create instance  
inukshuk


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-22-04 10:58 PM

I have a call rules shape in my orchestration and have created an instance o
f
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.....





[ Post a follow-up to this message ]



    Re: BTS 2004 Rule Engine - .NET class create instance  
Matt Milner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-23-04 10: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.....







[ Post a follow-up to this message ]



    Re: BTS 2004 Rule Engine - .NET class create instance  
Makarand Keer


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-09-04 10: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 
>
>
>





[ Post a follow-up to this message ]



    Re: BTS 2004 Rule Engine - .NET class create instance  
Alvaro Miranda [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-11-04 10: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






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:29 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register