Content Based Routing with EDI Pipeline/ Promote a custom property for EDI message
I had a requirement to implement Content Based Routing for EDI messages in BizTalk. I was using a edireceive pipeline to disassemble the incoming EDI messages.
For an xml or flat files messages, CBR is simple and can be achieved with just promoting the specific field and using xml/flatfile disassembler.
Assume I want to promote the BEG02 field of EDI 850 Schema. As usual I try to property promote(quick promotion) the BEG02 and use the EDI receive pipeline.
When I do this, at runtime it fails with a routing failure error. When I look at the context of the suspended messages I do see the below properties. That does not include my custom property.
I can see that only the Adapter's promoted properties and Edi default promoted properties are visible.
The most common option in such scenarios would be to write a custom pipeline component, but we figured out an easier option to achieve this.
After some research, I came to know xml disassembler is executed automatically after the receive pipeline on a condition if Inbound Map exist, so that the message type is promoted for the map’s output message.
I created a one on one map(with the input schema in the source and destination) with the Edi schema and used that in inbound maps.
After doing this my custom property BEG02 was getting promoted.
Hope this helps !! Happy BizTalking !!
Written By
Shashidharan Krishnan
Reviewed By
Jainath V R
Microsoft India GTSC