BizTalk Server 2013 R2 BHM toolBizTalk 2013 R2 ships with a new tool called as “BizTalk Health Monitor”. BHM is freely available for all BizTalk 2013 R2 users. More about BHM tool at BizTalkHealthMonitor
Recently, I was working on an issue, in which we were trying to construct a multi-part HL7 message.
An HL7 message, generally consist of 3 segments:
We were calling the HL7 receive pipeline, from within the orchestration, using the following call:
We were successfully able to receive the messages and create the XML corresponding to all the 3 segments. But when we tried to construct the multi –part message using the XMLs we were getting the error:xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'ODH.BTBiDirectional.Orchestrations.ProcessImmunizationHistory(7b3aa024-98a5-3af2-00e0-1eb55a9c888f)'.The service instance will remain suspended until administratively resumed or terminated.If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 184c71e3-2a8d-4989-8dba-a032fffb4e7cShape name: ConstructMessage_1ShapeId: 905a6fe1-58c1-4ab3-9791-1d44faa16beeException thrown from: segment 5, progress 10Inner exception: There was a failure executing pipeline "ODH.BTBiDirectional.Orchestrations.HL7TargetRSPSendPipeline". Error details: "Body schema is missing".
We were constructing the multi part message as follows:
Multipartmsg.MSHSegment = MSHSegmentXML;Multipartmsg.BodySegment = BodySegmentXML;Multipartmsg.ZSegment = ZSegmentXML;
The reason we get the above error is due to the fact that message type property for multi-part message is not available in the context of the message. To overcome this problem you also needto copy the context value from incoming message to multi-part message in the assignment shape while creating the multi-part message. You can use the following expression in the assignment shape to copy the context:
Also make sure that you set the MessageEncoding value for the newly formed HL7 message as well:
HL7MultipartMessage(BTAHL7Schemas.MessageEncoding) = 65001;
Once this being done, you can call the Send Pipeline from the orchestration and the message will get constructed successfully.
Hope this helps !!!
Written byRasika Chaudhary
Reviewed byChirag Pavecha
Microsoft India GTSC