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

From: Makarand Keer (
Date: 11/09/04

Date: Tue, 9 Nov 2021 07:00:04 -0800

Hi Matt

I have similar requirement.
I am using SDK to invoke RuleEngine.Execute method to apply the rules on
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

Please help


"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" <> wrote in message
> > 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.....

Relevant Pages