# External Request or Reply Message Flow

Implementing a request or reply solution is usually nonintrusive. You can execute existing host-side transactions and programs without changes.

TIBCO messaging applications can forward and receive messages from z/OS IMS transactions. Substation ES can initiate and execute IMS transactions by using the information received from messaging applications as input to transactions. You can configure Substation ES to determine whether the messaging application expects to receive a result or delivery notification of delivered messages.

The following is the process for a typical request or reply scenario:

1. TIBCO messaging application publishes a message intended for a Substation ES instance with an active subscription for the message.
2. Substation ES receives the message and transforms the contents of the message into a user-configured formatted buffer area.
3. Substation ES sends the buffer along with the control and execution information to Substation ES IMS Interface.
4. Substation ES IMS Interface constructs an OTMA message that contains a prefix and application information (LLZZ and buffer), and sends the OTMA message to IMS on a designated Tpipe.
5. When IMS receives the OTMA message, IMS either executes the command or schedules the applicable transaction for execution.
   - If IMS fails to execute its intended action, a message is normally returned to Substation ES IMS Interface. The message is logged and the messaging application receives an unsuccessful return code and message.
   - If IMS succeeds in the execution, the message that is created as a result of the IMS processes is returned to Substation ES IMS Interface on the originating Tpipe. By using one of the appropriate OTMA or IMS exits, the destination name (Tpipe) can be altered by IMS applications or IMS exits.
6. Substation ES IMS Interface extracts application data from the OTMA message and returns the data in the buffer area to ESB Interface.
7. The buffer received from the host-side interface is transformed into a reply. The format, type, and destination of the message intended for the TIBCO messaging applications are configurable within Substation ES.
8. The message is published to TIBCO messaging applications based on the level of service and destinations configured on the transformation recipe.

Copyright © TIBCO Software Inc. All rights reserved.