Outbound, in the role of provider, the HL7 Binding Component acts as follows:
The HL7 BC receives the HL7 message from the BPEL Service Engine.
If validate MSH is enabled, the HL7 BC validates the MSH segment fields, MSH-11–Processing ID and MSH-12–Version ID, against the configured Processing ID and Version ID. If validation fails, the HL7 BC sets the message exchange status to Error and sends the message back to the Normalized Message Router.
If sequence number is enabled, the HL7 BC inserts the sequence number in the message.
The HL7 BC converts the normalized message to the HL7 encoded form and sends it to the external HL7 system.
The HL7 BC receives the acknowledgement from the HL7 external system, and determines whether the acknowledgement is an ACK or NAK, and responds as follows:
An ACK is sent when the message exchange status is Done.
A NAK is sent when the message exchange status is Error.
If the HL7 message proves acceptable, the HL7 BC sends the normalized message to the BPEL Service Engine. An ACK or NAK is sent to the external HL7 message sender, based on the message exchange status received from the Normalized Message Router, as follows:
For an ACK, the HL7 BC sets the message exchange status to Done and sends it to the BPEL Service Engine. The ACK is also stored in a database.
For a NAK, the HL7 BC sets the message exchange status to Error and sends it to the BPEL Service Engine. The NAK is also stored in a database.