BizTalk Server General - Rule activity

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > August 2005 > Rule activity





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 Rule activity
PeterW

2005-08-03, 5:51 pm

I have created a Policy and Ruleset, some facts based on elements (Get and
Set) and also on constants. The facts are published and the policy deployed.
Attention has been paid to use the correct instances of objects in the
'then' part of the rules.

There are 95 rules currently with more to follow that dictate the action to
take for certain types of Validation errors in documents submitted for
publication.
The set of actions is 'resupply' or 'defertoqa'. 'resupply' has priority.

The whole document contains many elements that fire rules but the document
will have just one value for action at the end, being either resupply or
defertoqa or the original action value being 'none'. None is where there are
no errors, defertoqa is for warnings and resupply is where even one error has
been detected.

Therefore the xml document has an element named 'action' initialised to
'none' for which there are both get and set facts in the Business Rule
Composer to make available to the Rule Engine.

On firing a rule, the then part of the rule should set the value of the
element depending on priority and then an 'Update' should reassert the value
of the element to be available to future rule firings.

I cannot get the element to be updated.

I look at the ENGINE RULE TRACE and get matches for each rule in my rule
table against the element with the Test Result correctly being identified to
True or False for each element, then doing an assert and doing the same for
the next element etc. To me this means that the if part of the rule is OK.
The Trace then does all the retracts.

It does nothing else.

There is no other activity. I expected to get something like an AGENDA
UPDATE.. nothing! I also expected that the 'action' element in the document
would have been updated from its ititial 'None' value. Not so!

What must I do to get it to do something usefull like update the input xml
file, or get it to return a value to the Call Rules shape. I have written a
class implementing IFactRetriever but still do not end up being able to use
parameters with my policy.

I would settle for either approach but I need to get some updating of
'action' either as an element or as a variable. Better still I would like to
be able to do either at my whim to best suit the situation.

Baldness looms with the pulling out of hair! The documentation leaves far
too many things unstated to be really useful and the examples are woeful.
Sorry if I am running off at the mouth but I am stumped and disgruntled
having spent days trying to progress this.

Help please.

cheers


--
PeterW
PeterW

2005-08-04, 5:56 pm

No brain, no pain! The things that BizTalk enabled you to discover.... :-)

I had not added an assembly to the gac and so could not see the
FactRetriever. That is now visible in the CallRules shape as is the
variable. Have created a fact based on class property.

Now use fact to set property.

Onwards. We may yet see some results.

--
PeterW


"PeterW" wrote:

> I have created a Policy and Ruleset, some facts based on elements (Get and
> Set) and also on constants. The facts are published and the policy deployed.
> Attention has been paid to use the correct instances of objects in the
> 'then' part of the rules.
>
> There are 95 rules currently with more to follow that dictate the action to
> take for certain types of Validation errors in documents submitted for
> publication.
> The set of actions is 'resupply' or 'defertoqa'. 'resupply' has priority.
>
> The whole document contains many elements that fire rules but the document
> will have just one value for action at the end, being either resupply or
> defertoqa or the original action value being 'none'. None is where there are
> no errors, defertoqa is for warnings and resupply is where even one error has
> been detected.
>
> Therefore the xml document has an element named 'action' initialised to
> 'none' for which there are both get and set facts in the Business Rule
> Composer to make available to the Rule Engine.
>
> On firing a rule, the then part of the rule should set the value of the
> element depending on priority and then an 'Update' should reassert the value
> of the element to be available to future rule firings.
>
> I cannot get the element to be updated.
>
> I look at the ENGINE RULE TRACE and get matches for each rule in my rule
> table against the element with the Test Result correctly being identified to
> True or False for each element, then doing an assert and doing the same for
> the next element etc. To me this means that the if part of the rule is OK.
> The Trace then does all the retracts.
>
> It does nothing else.
>
> There is no other activity. I expected to get something like an AGENDA
> UPDATE.. nothing! I also expected that the 'action' element in the document
> would have been updated from its ititial 'None' value. Not so!
>
> What must I do to get it to do something usefull like update the input xml
> file, or get it to return a value to the Call Rules shape. I have written a
> class implementing IFactRetriever but still do not end up being able to use
> parameters with my policy.
>
> I would settle for either approach but I need to get some updating of
> 'action' either as an element or as a variable. Better still I would like to
> be able to do either at my whim to best suit the situation.
>
> Baldness looms with the pulling out of hair! The documentation leaves far
> too many things unstated to be really useful and the examples are woeful.
> Sorry if I am running off at the mouth but I am stumped and disgruntled
> having spent days trying to progress this.
>
> Help please.
>
> cheers
>
>
> --
> PeterW

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com