|
Home > Archive > BizTalk Server Orchestration > August 2005 > Calling Business Rules Policy from an Orchestration
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 |
Calling Business Rules Policy from an Orchestration
|
|
| angweetiong 2005-08-30, 8:01 am |
| Hi,
I wrote a Business Rule policy that looks something like this:
Condition - If ID is equal to 100,
Action - Inserts some data into a database table.
The ID is an element in an XML schema.
The insertion part is by using a .Net class that opens an SQL connection to
the DB server and executes a stored procedure that does the actual inserting
of records.
I've tested the policy out in the Rules Composer with the Test policy Tool
using a custom Fact Creator and all works well.
But when I tried calling the policy using a Call Rules shape in the
orchestration (with the .Net class passed as a parameter), it seems that no
data is inserted. I tried viewing the Policy trace in HAT and realise that
the rule was never called. The .Net class object is 'asserted' and
'retracted' with any rules being fired.
Please let me know what I have done wrong or what I have not done.
| |
| Matt Milner 2005-08-31, 5:58 pm |
| Was your dataconnection or datatable asserted? Was your fact creator
creating the dataconnection, or are you using a factretriever for that? If
you are not using a fact retriever on your policy for the dataconnection,
then you'll need to create an instance in your orhcestration and pass it as
a parameter in the call rules shape.
matt
"angweetiong" <angweetiong@discussions.microsoft.com> wrote in message
news:7B405007-E02B-4578-8649-213703159DB9@microsoft.com...
> Hi,
>
> I wrote a Business Rule policy that looks something like this:
>
> Condition - If ID is equal to 100,
> Action - Inserts some data into a database table.
>
> The ID is an element in an XML schema.
> The insertion part is by using a .Net class that opens an SQL connection
> to
> the DB server and executes a stored procedure that does the actual
> inserting
> of records.
>
> I've tested the policy out in the Rules Composer with the Test policy Tool
> using a custom Fact Creator and all works well.
>
> But when I tried calling the policy using a Call Rules shape in the
> orchestration (with the .Net class passed as a parameter), it seems that
> no
> data is inserted. I tried viewing the Policy trace in HAT and realise that
> the rule was never called. The .Net class object is 'asserted' and
> 'retracted' with any rules being fired.
>
> Please let me know what I have done wrong or what I have not done.
|
|
|
|
|