How to execute BTAHL72XSendPipeline in an orchestration

How to execute BTAHL72XSendPipeline in an orchestration



Introduction

This article presents a workable solution for using the BTAHL72XSendPipeline in an orchestration to create HL7 flat-file message.

Scenario for this Article

For this demonstration I am using the following statement as requirement:

  • The XML message confirming to the ADT A03 version 2.3.1 need to be picked up from the network share path.
  • The HL7 formatted flat file for ADT A03 need to be dropped at destination network share path.

As the input to the BTAHL72XSendPipeline need to be a multi-part message having 3 parts (MSHSegment, BodySegments, ZSegments) so an orchestration need to be created to create the multi-part message and to assign the content to these message parts.

Note: To know how to create HL7 formatted multipart message you can refer to the sectionCreating HL7 Formatted Data with an Orchestration’ of HL7 v2 Developer Guide

The following orchestration depicts the flow of message in orchestration:

Picture 1. Orchestration Flow.

You might get the following while executing the send pipeline in orchestration:

Exception thrown from: segment 2, progress 5

Inner exception: There was a failure executing pipeline "BTAHL72XPipelines.BTAHL72XSendPipeline". Error details: "Body schema is missing".

This error detail is little misleading as the multi-part message is having the message body part with name BodySegments. This error can be caused if the message type property for multi-part message is not available in the context of the message. To overcome this problem you need to copy the context value from incoming message to multi-part message in the assignment shape while creating the multi-part message as in above orchestration the following expression has been used in the assignment shape:

HL7_ADT_A03_MultiPart(*)=ADT_A03_XML(*);

Note: You can’t set the value of message type property in the assignment shape as it is read only value.

Download the Sample

The sample, CreatingHL7MsgWithOrchestration, built around the scenario discussed in this article can be downloaded from the MSDN Code Gallery http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-components-sitefiles/10_5F00_external.png .

Configure the BizTalk Server Application

Create a receive port and receive location while configuring the receive location use the XMLReceive pipeline so that the message type get promoted.

Picture 2. Configuring the receive location.

Create a send port and use the PassThruTransmit as Send pipeline.

Picture 3. Configuring the receive location.

Configure the orchestration to use the above receive port and send port.

Picture 4. Configure the orchestration.

Test the Solution

The sample XML instance for ADT A03 with name 'Body_ADT^A03.xml' is available as part of the code download in folder 'TestInstance'.

  • Start the send port.
  • Start the orchestration.
  • Enable the receive location.

Drop the sample instance at folder location being polled by receive location. The HL7 formatted flat file message should be available at the send port.

See Also

Read suggested related topics:

Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.
Leave a Comment
  • Please add 5 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Maheshkumar S Tiwari edited Revision 12. Comment: minor edit and formatting

  • Steef-Jan Wiggers edited Revision 11. Comment: Formatting

  • Steef-Jan Wiggers edited Revision 10. Comment: Removed duplicate heading

  • Steef-Jan Wiggers edited Revision 9. Comment: Removed duplicate heading

  • Steef-Jan Wiggers edited Revision 8. Comment: Added text to picture

  • Steef-Jan Wiggers edited Revision 7. Comment: Added text to pictures

  • Steef-Jan Wiggers edited Revision 6. Comment: Added resource links

  • Steef-Jan Wiggers edited Revision 3. Comment: Minor edit

  • Rohit.Sharma edited Original. Comment: Updating code download link

Page 1 of 1 (9 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Rohit.Sharma edited Original. Comment: Updating code download link

  • Thanks.It was helful to me.

  • Steef-Jan Wiggers edited Revision 3. Comment: Minor edit

  • Steef-Jan Wiggers edited Revision 6. Comment: Added resource links

  • Steef-Jan Wiggers edited Revision 7. Comment: Added text to pictures

  • Steef-Jan Wiggers edited Revision 8. Comment: Added text to picture

  • Steef-Jan Wiggers edited Revision 9. Comment: Removed duplicate heading

  • Steef-Jan Wiggers edited Revision 10. Comment: Removed duplicate heading

  • Steef-Jan Wiggers edited Revision 11. Comment: Formatting

  • Maheshkumar S Tiwari edited Revision 12. Comment: minor edit and formatting

Page 1 of 1 (10 items)