1

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.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Andrade
  • 23
  • 5
  • Have you tested the Policy in the Rules Composer? – Johns-305 Jan 28 '16 at 14:02
  • Yes. And it seems to be working fine there. It's really stressing me out at this point -_- – Andrade Jan 28 '16 at 14:04
  • 1
    Perhaps the BRE component should come after the XmlDisassembler? There is an internal dependency on the .Net Type which is resolved by the XmlDisassembler. – Johns-305 Jan 28 '16 at 14:14
  • Same result. The Status value of the output xml remains as "Denied". Since my policy is only referenced in the pipeline component of the framework, do I need to deploy it directly into the application on biztalk is the composer deploy enough? – Andrade Jan 28 '16 at 14:42
  • 1
    Have you tired putting a folder into "TrackingFolder" on the BRE Pipeline Component? This will 1) Create a log file each time it fires 2) Will tell you what the execution of the policy was. Also what Vocab item is firing in the Action? – Dijkgraaf Jan 28 '16 at 18:44
  • It does not really matter where the policy is, as long as it is deployed it will fire regardless as to which Application it is in. It is just better practice to have it in the Application that uses it as if you do a full start, it will Deploy the policies in it as well. – Dijkgraaf Jan 28 '16 at 18:48

1 Answers1

1

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.

Community
  • 1
  • 1
Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
  • Will give this a try and will leave feedback after testing it. Thanks a lot for the information, and that link really is shedding a light on how things work "behind the curtains", it's a good read. – Andrade Jan 29 '16 at 09:47