Correlating the response from the Java application to the synchronous callout request

If your Java application generates an output response and you need to correlate the response with the initial synchronous callout request, your IMS™ application is responsible for such correlation.

For asynchronous callout, correlation can be achieved by defining some data, such as a message identifier or a unique request ID, in the callout request that can correlate with the initial input message.

For synchronous callout, use the correlator token that is passed with the callout message.

The following diagram demonstrates the high-level steps that are involved in a non-MDB application to retrieve an IMS callout request and to send the response back.
Figure 1. Process flow for retrieving and responding to a synchronous callout request from IMS for non-MDB Java applications
This diagram shows the process flow for a non-MDB Java application to retrieve and respond to a synchronous callout request.
  1. The Java™ application issues a SYNC_RECEIVE_CALLOUT request to the OTMA tpipe TP1.
  2. An IMS application issues a DL/I ICAL call with the SENDRECV subfunction and specifies the OTMA destination descriptor name and the timeout value.
  3. IMS OTMA delivers the request message to the IMS TM resource adapter through IMS Connect. A correlation token is sent with the callout request.
  4. The Java application receives the callout request message and the correlation token. After processing the request, the Java application sends the response message and the correlation token back to IMS by using the SYNC_SEND request. With the correlation token, IMS correlates the response message back to the corresponding IMS transaction instance.