Running the EDIFACT sample
This topic explains how to put the test messages through the EDIFACT message flow.
The input messages
The EDIFACT sample contains the following five test messages.
- D.96A_INVOIC_1.enqueue
- D.96A_INVOIC_2.enqueue
- D.96A_INVOIC_3.enqueue
- D.96A_INVOIC_4.enqueue
- D.96A_INVOIC_missing_BGM.enqueue
All five input messages are INVOIC messages. The first four input messages are valid. The fifth input message is not valid: the BGM 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. Follow the instructions below:
- Put one of the input messages on the EDIFACT_TO_XML_IN queue:
- In the EDFACT Message Flows project, double-click one of the enqueue files to open it in the Enqueue editor.
- In the Enqueue editor, click Write To queue. The message in the enqueue file is written to the queue.
When you put a message on the EDIFACT_TO_XML_IN queue, the EDIFACT_TO_XML_IN MQInput node in the first message flow (called VALIDATINGEDIFACT2XML.msgflow) parses the message and validates it against the message set:
- If the message is a valid EDIFACT message, it is passed to the Compute node which converts the EDIFACT message to an XML message. The Compute node then passes the message to the EDIFACT_TO_XML_OUT MQOutput node which puts the message on the EDIFACT_TO_XML_OUT queue.
- If the message is not a valid EDIFACT message, the message is passed to the EDIFACT_FAIL node, which puts the message on the EDIFACT_FAIL queue.
- Get the transformed message from the EDIFACT_TO_XML_OUT queue using the Dequeue Message dialog:
- Click Get a message from a Queue on the toolbar.
- In the Dequeue Message dialog, enter the connection details, and in the Queue name field, type EDIFACT_TO_XML_OUT.
- Click Read From Queue. The transformed message is displayed in the Dequeue Message dialog. The message is now in XML format.
- Click Save As.... Browse to the location where you want to save the message, and enter a file name, then click Save.
- Put your saved message from step 2 on the XML_TO_EDIFACT_IN queue using the Enqueue editor.
- Click File > New > Message Enqueue File.
A new enqueue file is created and opens in the Enqueue editor.
- In the Queue manager name field, type WBRK6_DEFAULT_QUEUE_MANAGER.
- In the Port field, type 2414.
- In the Queue name field, type the name of the desired queue.
- Click Browse, then navigate to the location of your saved message from step 2 and click OK.
- Click Write To queue.
When you put the message on the XML_TO_EDIFACT_IN queue, the XML_TO_EDIFACT_IN MQInput node in the second message flow (called VALIDATINGXML2EDIFACT.msgflow) parses the message and validates it against the message set:
- If the message is a valid XML message, it is passed to the Compute node which converts the XML message to an EDIFACT message. The Compute node then passes the message to the XML_TO_EDIFACT_OUT MQOutput node which puts the message on the XML_TO_EDIFACT_OUT queue.
- If the message is not a valid XML message, the message is passed to the EDIFACT_FAIL node, which puts the message on the EDIFACT_FAIL queue.
- Get the message from the XML_TO_EDIFACT_OUT queue. The message is now an EDIFACT message.
If there is no message on the EDIFACT_TO XML_OUT or XML_TO_EDIFACT_OUT queues, see Diagnosing problems. The message might still be on the input queue, or it might be on the EDIFACT_FAIL queue, or on one of the system queues.
The D.96A_INVOIC_missing_BGM.enqueue message
When you put the D.96A_INVOIC_missing_BGM.enqueue message through the first message flow, the validation on the EDIFACT_TO_XML_IN MQInput node fails because the BGM field is missing from the message. The EDIFACT_TO_XML_IN MQInput node puts the message on the EDIFACT_FAIL queue.
Back to sample home