02-26-06 03:47 PM
Hello vt_asparagus@yahoo.com,
You should create a rule that has a 'exists in' predicate.
Use the following Xpath at the left side of this predicate:
/Item[IsStandard=0]
For the right side use:
/Request/Items
This will make the rule engine loop over all the 'Item' nodes inside the
'Items' and check all the is standard nodes.
You build this rule by adjusting the standard XPath statements in the proper
ties
window of you XML schema.
HTH,
Randal van Splunteren
http://biztalkia.blogspot.com
> Hi all,
>
> Look at the XML structure below. I need a business rule that says
> that if there is a single Non-Standard item (IsStandard=0) then the
> Request as a whole needs to be treated as Non-Standard. Although, we
> are having problems building this rule easily because BRE seems to
> only evaluate first IsStandard element. Does anyone know of a way to
> iterate over all of IsStandard elements in the BRE?
>
> <Request>
> <Items>
> <Item>
> <Number>111</Number>
> <IsStandard>1</IsStandard>
> </Item>
> <Item>
> <Number>222</Number>
> <IsStandard>0</IsStandard>
> </Item>
> <Item>
> <Number>333</Number>
> <IsStandard>1</IsStandard>
> </Item>
> </Items>
> </Request>
[ Post a follow-up to this message ]
|