WebSphere Partner Gateway supports synchronous and asynchronous flows with sending and receiving trading partners. Synchronous interaction involves response business documents. This means that if a sending trading partner invokes WebSphere Partner Gateway synchronously, it expects a business-protocol-level synchronous response. Similarly, if WebSphere Partner Gateway invokes a receiving trading partner synchronously, it expects a synchronous business-protocol-level response. Note that synchronous and asynchronous interactions are dictated by the business protocol requirements and trading partner agreements. Synchronous interactions depend on the nature of the transports used as well. For example, in the case of HTTP, send the response in the same HTTP connection.
This section explains how you can use the user exit capabilities of WebSphere Partner Gateway to develop synchronous and asynchronous flows. The following table lists the various types of document flows that can be supported between a sending trading partner, WebSphere Partner Gateway, and a receiving trading partner.
Sending trading partner | WebSphere Partner Gateway | Receiving trading partner |
---|---|---|
A. Sends a business document (asynchronous) |
|
Receives the business document (asynchronous) |
B. Sends a business document (asynchronous) |
The processing steps are the same as in A above. However, the protocol packaging handler sets the BCGDocumentConstants.BCG_GET_SYNC_RESPONSE attribute on the business document, which causes the sender to send the request document synchronously to the receiving trading partner. The sender waits to receive the response business document. The response business document received by the sender is introduced into the Document Manager by the Delivery Manager. This document is processed like any other document. |
|
C. Sends the request business document synchronously to WebSphere Partner Gateway. Synchronously receives response business document from WebSphere Partner Gateway. |
The processing steps are the same as in A above. However, the protocol packaging handler sets the BCGDocumentConstants.BCG_GET_SYNC_RESPONSE attribute on the business document, making the sender send the request document synchronously to the receiving trading partner. The sender waits to receive the response business document. Note the following points in this scenario:
After the sender receives the response business document, it is processed as follows:
|
Receives the business document (synchronous). Responds synchronously with business document. |