xmlbiztalkbiztalk-rule-enginebiztalk-pipelines

BizTalk Business Rules Engine Pipeline Framework


I have this XML message:

<ns0:PurchaseOrder xmlns:ns0="http://Samples.BreFramework.Schemas.Schema1">
  <Header>
    <ReqID>ReqID_0</ReqID>
    <Date>Date_0</Date>
  </Header>
  <Item>
    <Description>Description_0</Description>
    <Quantity>400</Quantity>
    <UnitPrice>20</UnitPrice>
  </Item>
  <Status>Denied</Status>
</ns0:PurchaseOrder>

I'm using a pipeline named PurchaseOrder_Receive with the following stages set:Decode Stage properties and default XML Disassembler

My policy is set like so: PurchaseOrderRules - Policy

All my ports are configured correctly, using the above pipeline in my ReceiveLocation.

The Xml message I posted is the one being used as input, however, the output Xml message should contain a Status value of "Approved", but it remains as "Denied".

Basically, the question here is, what am I doing wrong that prevents my policy from being used on the pipeline, keep in my mind that my policy's "If condition" is always true.


Solution

  • I pinged the author of the BRE Pipeline Framework and this is his response.

    I do not see an InstructionLoaderPolicy being used in the question at all. The XML document type must be asserted in the InstructionLoaderPolicy for XML based facts to be accessible to the ExecutionPolicy. This is documented here (following the text "To create the TypedXMLDocument object") - https://adventuresinsidethemessagebox.wordpress.com/2014/03/19/using-the-bre-pipeline-framework-to-assess-and-update-xml-message-content-using-xml-vocabularies/. It's important that the message type specified in InstructionLoaderPolicy matches the message type in the XML vocabulary.

    Your suggestion for him to apply the TrackingFolder parameter was spot on. He'd likely see the XML fact wasn't asserted and thus the rule didn't fire. Using CAT instrumentation tracing would also be very helpful.