Step 12: Configure Orchestration Shapes
In this step, you complete the configuration of the orchestration shapes in order to remove the insufficient configuration smart tags. You designate DoorbellOutputMessage as the output of the first transform process, designating DoorbellMap.btm as the map used in that process. You then designate DoorbellFinalMessage as the output of the second transform process, and add the expression that enriches the message with additional field data.
To configure orchestration shapes
On the orchestration Design view surface of Visual Studio, click the ConstructMessage_1 shape.
In the Properties window, click the Messages Constructed property, select DoorbellOutputMessage from the drop-down list, and then press Enter.
On the orchestration Design view surface, click the DoorbellTransform shape inside of the ConstructMessage_1 shape. In the Properties window, click Map Name, and then click the ellipsis (…) button in the attribute field.
In the Transform Configuration dialog box, select Existing Map. In the Fully Qualified Map Name drop-down list, click BTAHL7_Project.DoorbellMap.
Click Source in the left pane.
Click the empty box under Variable Name and click DoorBellInputMessage from the drop-down list.
Click Destination in the left pane.
Click the empty box under Variable Name and click DoorbellOutputMessage from the drop-down list.
Click OK to save changes.
On the orchestration Design view surface, click the ConstructMessage_2 shape.
In the Properties window, click Messages Constructed, select DoorbellFinalMessage from the drop-down list, and then press Enter.
On the orchestration Design view surface, click the DoorbellFinalTransform shape inside of the ConstructMessage_2 shape. In the Properties window, click Expression, and then click the ellipsis (…) button to open BizTalk Expression Editor.
In BizTalk Expression Editor, click in the text field and paste the following text:
HeaderInfo = new System.Xml.XmlDocument(); HeaderInfo.LoadXml("<ns0:MSH_25_GLO_DEF xmlns:ns0=\"http://microsoft.com/HealthCare/HL7/2X\"> <MSH><MSH.2_EncodingCharacters>^~\\&</MSH.2_EncodingCharacters><MSH.3_SendingApplication> <HD.0_NamespaceId>SrcApp</HD.0_NamespaceId><HD.1_UniversalId>SrcAppUid</HD.1_UniversalId> </MSH.3_SendingApplication><MSH.4_SendingFacility><HD.0_NamespaceId>srcFac</HD.0_NamespaceId> <HD.1_UniversalId>srcFacUid</HD.1_UniversalId></MSH.4_SendingFacility><MSH.5_ReceivingApplication> <HD.0_NamespaceId>dstApp</HD.0_NamespaceId><HD.1_UniversalId>dstAppUid</HD.1_UniversalId> </MSH.5_ReceivingApplication><MSH.6_ReceivingFacility><HD.0_NamespaceId>dstFac</HD.0_NamespaceId> <HD.1_UniversalId>dstFacUid</HD.1_UniversalId></MSH.6_ReceivingFacility><MSH.7_DateTimeOfMessage> <TS.1>200307092343</TS.1></MSH.7_DateTimeOfMessage><MSH.8_Security>sec</MSH.8_Security> <MSH.9_MessageType><CM_MSG.0_MessageType>ADT</CM_MSG.0_MessageType> <CM_MSG.1_TriggerEvent>A04</CM_MSG.1_TriggerEvent></MSH.9_MessageType> <MSH.10_MessageControlId>msgid2134</MSH.10_MessageControlId><MSH.11_ProcessingId> <PT.0_ProcessingId>P</PT.0_ProcessingId></MSH.11_ProcessingId><MSH.12_VersionId> <VID_0_VersionId>2.2</VID_0_VersionId></MSH.12_VersionId></MSH></ns0:MSH_25_GLO_DEF>"); DoorbellFinalMessage.MSHSegment = HeaderInfo; DoorbellFinalMessage.BodySegments = DoorbellOutputMessage; DoorbellFinalMessage.ZSegments = ""; DoorbellFinalMessage(BTAHL7Schemas.MSH1) = 124; DoorbellFinalMessage(BTAHL7Schemas.MessageEncoding) = 65001; DoorbellFinalMessage(BTAHL7Schemas.MSH2) = "^~\\&"; DoorbellFinalMessage(BTAHL7Schemas.ParseError) = false; DoorbellFinalMessage(BTAHL7Schemas.ZPartPresent) = false; DoorbellFinalMessage(BTAHL7Schemas.SegmentDelimiter2Char) = true;
Click OK.
Important
In the "HeaderInfo.LoadXml" expression, delete the carriage returns and spaces within the expression. The "HeaderInfo.LoadXml" statement should be on one line.
Note
The first block of the preceding text is an example of a hard-coded XML header. The BTAHL7 serializer requires a header segment. You can customize these header values according to the needs of your environment. The second block of the preceding text defines the three message parts required in a multipart message. The BTAHL7 serializer requires a multipart message. The third block of the preceding text contains the promoted properties that the BTAHL7 serializer examines in order to serialize an XML message into an HL7 flat-file message.
Proceed to Step 13: Create and Configure Ports.