Running the SWIFT sample
This topic explains how to put the test messages through the SWIFT message flow.
The input messages
The SWIFT sample contains the following four test messages.
- 103_1001.enqueue
- 103_1002.enqueue
- 103_1003.enqueue
- 103_missing_SW20.enqueue
All four input messages are MT103 Single Customer Credit Transfer messages. The first three input messages are valid. The fourth input message is not valid: the SW20 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 SWIFT_TO_XML_IN queue:
- In the SWIFT 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 SWIFT_TO_XML_IN queue, the SWIFT_TO_XML_IN MQInput node in the first message flow (called VALIDATINGSWIFT2XML.msgflow) parses the message and validates it against the message set:
- If the message is a valid SWIFT message, it is passed to the Compute node which converts the SWIFT message to an XML message. The Compute node then passes the message to the SWIFT_TO_XML_OUT MQOutput node which puts the message on the SWIFT_TO_XML_OUT queue.
- If the message is not a valid SWIFT message, the message is passed to the SWIFT_FAIL node, which puts the message on the SWIFT_FAIL queue.
- Get the transformed message from the SWIFT_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 SWIFT_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, enter a file name, then click Save.
- Put your saved message from step 2 on the XML_TO_SWIFT_IN queue using Enqueue.
- 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_SWIFT_IN queue, the XML_TO_SWIFT_IN MQInput node in the second message flow (called VALIDATINGXML2SWIFT.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 a SWIFT message. The Compute node then passes the message to the XML_TO_SWIFT_OUT MQOutput node which puts the message on the XML_TO_SWIFT_OUT queue.
- If the message is not a valid XML message, the message is passed to the SWIFT_FAIL node, which puts the message on the SWIFT_FAIL queue.
- Get the message from the XML_TO_SWIFT_OUT queue. The message is now a SWIFT message.
If there is no message on the SWIFT_TO XML_OUT or XML_TO_SWIFT_OUT queues, see Diagnosing problems. The message might still be on the input queue, or it might be on the SWIFT_FAIL queue, or on one of the system queues.
The 103_missing_SW20.enqueue message
When you put the 103_missing_SW20.enqueue message through the first message flow, the validation on the SWIFT_TO_XML_IN MQInput node fails because the SW20 field is missing from the message. The SWIFT_TO_XML_IN MQInput node puts the message on the SWIFT_FAIL queue.
Industry standard formats
Back to sample home