Putting the test messages through the SWIFT message flow.
The input messages
The SWIFT sample contains the following four test messages:
103_0001.mbtest
103_0002.mbtest
103_0003.mbtest
103_missing_SW20.mbtest
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.
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. Complete the following instructions to run the sample:
Put one of the input messages on the SWIFT_TO_XML_IN queue:
In the Application Development view, expand the SWIFT Message Flows project. Double-click one of the
.mbtest files to open it in the Test Client.
In the Test Client, click Enqueue.
Click Send Message. The message in the
.mbtest 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 by using Dequeue:
In the Test Client, click Dequeue.
Click Get Message to read a
message from the SWIFT_TO_XML_OUT queue.
Ensure that Source is selected
under Detailed Properties. Right-click
the contents of the message in the Source pane, and click
Select All.
Right-click the contents of the message in the Source pane,
and click Copy to take a copy of the
message.
Put your copied message from step 2 on the XML_TO_SWIFT_IN queue by using the Test Client:
In the Test Client, click Enqueue.
In the Source pane, right-click the Source message and
click Select All. Right-click
and select Paste to replace the
existing source message.
In the Queue name field, type
XML_TO_SWIFT_IN
Click Send Message to put the copied message onto the 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.
In the Test Client, click Dequeue.
In the Queue name field, type XML_TO_SWIFT_OUT
Click Get Message to get the message from the XML_TO_SWIFT_OUT
queue. The message is now a SWIFT message.
If no message is found on the SWIFT_TO XML_OUT or XML_TO_SWIFT_OUT queues,
see Resolving problems when running samples in the
IBM Integration Bus documentation.
The message might still be on the input queue, the SWIFT_FAIL queue, or on one of the
system queues.
The 103_missing_SW20.mbtest message
When you put the 103_missing_SW20.mbtest 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.