Business Rules Engine and object properties
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 > Business Rules Engine and object properties




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

    Business Rules Engine and object properties  
Craig Vermeer


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


 
01-16-06 10:54 PM

Hello,

I have a question on using the Business Rules engine in BizTalk 2004.

I want design a business rule policy where I pass in two objects of the
same type, and evaluate the the values of certain properties on both of
those objects from within the Business Rules Engine.

Here's an example: I have a class called MyClass, and want to pass the
instances newMyClass and oldMyClass into the Rules Engine.  From within
the Business Rules composer, I want a rule that's like this:

if(newMyClass.Name Is Not Equal To oldMyClass.Name)
Then
"Blah"

Now, I can setup my vocabulary to have two instances of MyClass, and
pass those into my Policy.  However, I can't seem to evaluate the
properties on MyClass from within the Business Rule Composer.  Is it
simply a matter of setting up a definition within my Vocabulary that
points to the property?  If so, how do I tell the definition that I want
it to be the property from the newMyClass instance, rather than the
oldMyClass instance?

Any help is appreciated.  I've tried searching around for some good
Business Rule Composer tutorials, but have found precious few resources.
If anyone has links to good resources on using the BRE, that would be
appreciated, as well.

Thanks,
Craig Vermeer





[ Post a follow-up to this message ]



    Re: Business Rules Engine and object properties  
Tomas Restrepo \(MVP\)


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


 
01-17-06 01:50 AM

Hi Craig,

> I have a question on using the Business Rules engine in BizTalk 2004.
>
> I want design a business rule policy where I pass in two objects of the
> same type, and evaluate the the values of certain properties on both of
> those objects from within the Business Rules Engine.
>
> Here's an example: I have a class called MyClass, and want to pass the
> instances newMyClass and oldMyClass into the Rules Engine.  From within
> the Business Rules composer, I want a rule that's like this:
>
> if(newMyClass.Name Is Not Equal To oldMyClass.Name)
> Then
> "Blah"
>
> Now, I can setup my vocabulary to have two instances of MyClass, and pass
> those into my Policy.  However, I can't seem to evaluate the properties on
> MyClass from within the Business Rule Composer.  Is it simply a matter of
> setting up a definition within my Vocabulary that points to the property?
> If so, how do I tell the definition that I want it to be the property from
> the newMyClass instance, rather than the oldMyClass instance?
>
> Any help is appreciated.  I've tried searching around for some good
> Business Rule Composer tutorials, but have found precious few resources.
> If anyone has links to good resources on using the BRE, that would be
> appreciated, as well.


AFAIK, you don't need to tell the BRE to differenciate between the two. As
long as the two facts (i.e. the two .NET objects are asserted to the BRE
before evaluating the policy), the BRE runtime will know what to do by just
saying:

IF myClass.Name is Not equal to myClass.Name
THEN
...

as the engine will evaluate match all facts (including your two instances of
myClass) to see if they match the definition.

I thing Charles Young explains it a little more clearly in his "Comparing
the WWF rules engine and the BizTalk BRE" article
(http://geekswithblogs.net/cyoung/articles/56488.aspx). Check out the part
that reads "Forward Chaining in MS BRE".


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/







[ Post a follow-up to this message ]



    Re: Business Rules Engine and object properties  
Craig Vermeer


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


 
01-17-06 10:58 PM

Great, that helps.  I'll take another pass at implementing my rules
based on this info.  I think, as the blog entry said, that I just need
to start thinking a little less procedurally 

Tomas Restrepo (MVP) wrote:
> Hi Craig,
> 
>
>
> AFAIK, you don't need to tell the BRE to differenciate between the two. As
> long as the two facts (i.e. the two .NET objects are asserted to the BRE
> before evaluating the policy), the BRE runtime will know what to do by jus
t
> saying:
>
> IF myClass.Name is Not equal to myClass.Name
> THEN
>     ....
>
> as the engine will evaluate match all facts (including your two instances 
of
> myClass) to see if they match the definition.
>
> I thing Charles Young explains it a little more clearly in his "Comparing
> the WWF rules engine and the BizTalk BRE" article
> (http://geekswithblogs.net/cyoung/articles/56488.aspx). Check out the part
> that reads "Forward Chaining in MS BRE".
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:06 PM.      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