Running the X12 sample

This topic explains how to put the test messages through the X12 sample message flow.

The input messages

The X12 sample contains the following three test messages:

All three input messages are 850 Purchase Order messages. The first two input messages are valid. The third input message is not valid: the BEG field is missing from the message.

Running the sample

To run the sample, you must put messages on the input queues, and get messages from the output queues. You can use the Dequeue section of the Test Client to retrieve the messages from the output queues. If the message is not on the output queue you expect, change the name of the output queue to the name of the failure queue. Follow the instructions below to run the sample:

  1. Put one of the input messages onto the X12_TO_XML_IN queue:
    1. Application Development view, expand the X12 Message Flows project. Double-click one of the .mbtest files to open it in the Test Client.
    2. In the Test Client, click Enqueue.
    3. Click Send Message. The message in the .mbtest file is written to the queue.

    When you put a message onto the X12_TO_XML_IN queue, the X12_TO_XML_IN MQInput node in the first message flow (called VALIDATINGX122XML.msgflow), parses the message and validates it against the message set:

  2. Get the transformed message from the X12_TO_XML_OUT queue using Dequeue:
    1. In the Test Client, click Dequeue.
    2. Click Get Message to read a message from the X12_TO_XML_OUT queue.
    3. Ensure that Source is selected under Detailed Properties. Right-click the contents of the message in the Source pane, and click Select All.
    4. To take a copy of the message, right-click the contents of the message in the Source pane, and click Copy.
  3. Put your copied message from step 2 onto the XML_TO_X12_IN queue using the Test Client.
    1. In the Test Client, click Enqueue.
    2. In the Source pane, right-click the Source message and click Select All. Then right-click and select Paste, to replace the existing source message.
    3. In the Queue name field, type XML_TO_X12_IN.
    4. Click Send Message to put the copied message onto the queue.

    When you put the message onto the XML_TO_X12_IN queue, the XML_TO_X12_IN MQInput node in the second message flow (called VALIDATINGXML2X12.msgflow), parses the message and validates it against the message set:
  4. Get the message from the XML_TO_X12_OUT queue. The message is now an X12 message.

If there is no message on the X12_TO XML_OUT or XML_TO_X12_OUT queues, see Resolving problems when running samples in the IBM Integration Bus documentation. The message might still be on the input queue, the X12_FAIL queue, or on one of the system queues.

The PurchaseOrder_Missing_BEG.mbtest message

When you put the PurchaseOrder_Missing_BEG.mbtest message through the first message flow, the validation on the X12_TO_XML_IN MQInput node fails because the BEG field is missing from the message. The X12_TO_XML_IN MQInput node puts the message on the X12_FAIL queue.

Back to sample home