Receive-Side Processing of an Incoming EDI Message over AS2
Receive-side processing of an EDI message over AS2 includes receiving the AS2 message, sending an MDN, processing the EDI payload, and sending EDI acknowledgments (if enabled).
The AS2EdiReceive receive pipeline receives the AS2 message, and disassembles the EDI payload within the AS2 message. The AS2EDISend send pipeline sends an MDN in response to the AS2 message, and an EDI acknowledgment returned in response to the EDI message. You can include these pipelines in an HTTP two-way solicit response send port (if the MDN is synchronous), or in a one-way HTTP send port and a one-way HTTP receive port (if the MDN is asynchronous).
To receive an EDI interchange over AS2, BizTalk Server will perform the following steps:
Processing the received AS2 message
Sending an MDN
Processing the received EDI payload
Sending an EDI Acknowledgment
Processing the Received AS2 message
The AS2 Decoder in the AS2EdiReceive receive pipeline processes an incoming AS2 message. It does so using the InboundHTTPHeaders
context property, which the HTTP adapter creates from the HTTP headers in the AS2 message. These headers include the following AS2 headers:
AS2-To
AS2-From
AS2-Version
MessageID
OriginalMessageID (for MDNs only)
Disposition-Notification-To (if an MDN is requested)
Receipt-Delivery-Option (if an MDN is requested)
Signed-Receipt-MICalg (if an MDN is requested)
The AS2 Decoder will promote these headers to the context of the message. It then does the following:
Performs agreement resolution to determine the properties to be used to process the incoming message. For more information, see Agreement Resolution for Incoming AS2 Messages.
Authenticates the sender using the AS2-From property.
Note
For more information about the processing that the AS2 receive pipelines perform on incoming AS2 messages, see Processing an Incoming AS2 Message.
Sending an MDN
If an MDN was enabled, the AS2EdiReceive pipeline generates an MDN and drops it into the MessageBox.
Note
For more information about the processing that the AS2 receive pipelines perform on outgoing MDNs, see Generating an Outgoing MDN.
Synchronous Mode
If an EDI message is sent over AS2 in synchronous mode, BizTalk Server will return the MDN over that synchronous connection and then close the connection. Since the connection has been closed, BizTalk Server cannot return an EDI acknowledgment (997, TA1, or CONTRL) over that connection. EDI acknowledgments are always sent asynchronously over AS2.
The MDN will be generated by the AS2EDIReceive pipeline, routed by that pipeline to the MessageBox, and then automatically picked up by the AS2Send pipeline that is part of the request response receive port.
Asynchronous Mode
If an EDIINT/AS2-encoded message is sent over HTTP/HTTPS transport in asynchronous mode, you must create a send port to return the MDN separately. You can configure this send port to return both asynchronous MDNs and EDI acknowledgments. If it is a dynamic send port, it will use the address in the Receipt-Delivery-Notification line in the header of the message to route the message to the trading partner. If it is a static send port, it will use the address configured in port properties. This send port subscribes to the asynchronous MDN by using an EdiIntAS.IsAS2AsynchronousMDN==True
filter expression.
In asynchronous processing, the AS2EdiReceive pipeline will generate an HTTP response in addition to the MDN. The receive port returns the HTTP response to the original sender over the HTTP connection between the receive port and the sending party, which closes that connection. This is necessary because the synchronous connection is not closed by the MDN.
If BizTalk transports an EDIINT/AS2-encoded message over HTTP/HTTPS, but processing of the EDI-encoded payload fails, the sender of the original message would receive both an MDN indicating successful AS2 processing and an EDI acknowledgment indicating a failure in EDI processing. The EDI-encoded payload would be suspended and an error would be posted.
Processing the Received EDI Payload
If the Inbound batch processing option for an EDI agreement is set to Split Interchange, the AS2EdiReceive receive pipeline associated with the two-way request response receive location parses the EDI message into a separate XML message for each EDI transaction set. If the Inbound batch processing option is set to Preserve Interchange, the receive pipeline will not parse the EDI message.
The receive pipeline routes the XML transaction sets or the preserved EDI interchange to the BizTalk MessageBox.
If the message is to be routed to a back-end application, a send port picks up the XML message and routes it to the application.
Note
This send port can be of any type.
Sending the EDI Acknowledgment
If an EDI acknowledgment was enabled, the EDI Disassembler in the AS2EdiReceive receive pipeline will generate EDI acknowledgments (if enabled). The EDI acknowledgments must be sent by the AS2EdiSend send pipeline in a separate one-way send port.
If you set up a two-way request-response receive port for EDI/AS2 messages to return a synchronous MDN or an HTTP response (in the case of an asynchronous MDN), the Route ACK to send pipeline on request-response receive port property (set in the Local Host Settings page of the one-way EDI agreement in the Agreement Properties dialog box) will be ignored. Even if this property is checked, the send pipeline will return either a synchronous MDN or an HTTP response, not an EDI acknowledgment.
For more information, see Sending an EDI Acknowledgment.