After you have imported and deployed the sample, you
can run it by following these instructions.
For an overview of how these nodes work and are
configured, see
IBM Information Management System (IMS)
in the IBM Integration Bus documentation.
This sample uses the main message flow IMSSyncRequestSample, which
contains two subflows.
In the Application Development view, expand the
IMSSyncRequestSampleFlowProject project.
Double-click IMSSyncRequestSuccess.mbtest
to open the message in the Test Client, select Enqueue.
In the Detailed Properties panel, click Send Message.
A WebSphere MQ Request XML message is placed on the
IMS_SYNC_REQUEST_IN1 queue. This message is read by the IMSSyncRequestSample
message flow.
The XML message is mapped to an IMS binary format by using a
Mapping node.
The MQMD is saved to the local environment by using a Compute node.
The IMSRequest node sends the request to IMS and receives
the result of running the transaction.
The response is parsed into individual segments and, based on
the contents, it is treated as either a success or a failure (in this
case, a success).
Based on the contents of the segments, the message is then
parsed either as a REXX message or a COBOL message (in this case, REXX).
The parsed response is mapped to an XML format and
sent to a queue.
The TCPIPClientEmulation flow sends the request to the
IMS_SYNC_REQUEST_OUT1 queue.
Select Dequeue, in the Detailed Properties panel
click Get Message.
To check that the reply message has been sent successfully
over WebSphere MQ, view the reply message in the Detailed Properties panel by using
the XML Structure viewer. The message contains inventory details in the following format:
To test the failure route, double-click IMSSyncRequestFailure.mbtest, the
the message opens in the Test Client. Select Enqueue.
In the Detailed Properties panel, click Send Message,
the following events occur:
Processing continues in the same way as with the success case, but this time IMS
returns a single-segment error message.
The error message is detected because only one
segment exists, and the data is parsed with the correct message type.
The error data is copied to an XML message and sent to the
IMS_SYNC_REQUEST_OUT1 queue.
Select Dequeue. In the Detailed Properties panel, click
Get Message.
To check that the reply message has been sent successfully
over WebSphere MQ, view the reply message in the Detailed Properties panel by using
the XML Structure viewer. The message contains error details in the following format:
<msg_REJECTMESSAGE>
<reject_reason>Part Number BROKEN not in DataBase</reject_reason>
</msg_REJECTMESSAGE>
If you complete all these steps successfully, the sample is complete.
Look at the nodes in the main message flows to see how the
results were achieved.