About the Video message flow
The figure below shows the Video message flow.
For information about message flows, see Message flows in the WebSphere Message Broker documentation.
How the message flow works
The Video message flow extracts information from input messages about the customer's personal details and videos the customer has got on loan. You can use this message flow to see how the CWF, XML, and TDS input messages are parsed as they are passed through the message flow. The Video message flow performs the following actions:
- Identifies the input message as having either a CWF, XML or TDS physical format.
- Fully parses the input message.
- Extracts information from the input message about the customer's name and the videos the customer has on loan, and multiplies the value of the Cost field in the input message by two.
- Outputs the transformed message to the user.
For more information, read about physical formats in the WebSphere Message Broker documentation.
The following table describes the tasks performed by each node in the Video message flow.
Node name |
Node type |
Tasks performed by node |
VIDEO_XML_IN |
MQInput |
- Gets the input message from the input queue (also called VIDEO_XML_IN).
- Passes the input message, via the Out terminal, to the Extract Fields node.
Alternatively, if there is a problem identifying the input message, VIDEO_XML_IN
passes the input message, via the Failure terminal, to the VIDEO_FAIL node.
If an exception occurs downstream in the message flow and the message is 'rolled
back' to VIDEO_XML_IN, the node passes the input message, via the Catch terminal,
to the VIDEO_FAIL node.
|
VIDEO_TDS_IN |
MQInput |
- Gets the input message from the input queue (also called VIDEO_TDS_IN).
- Passes the input message, via the Out terminal, to the Extract Fields node.
Alternatively, if there is a problem identifying the input message, VIDEO_TDS_IN
passes the input message, via the Failure terminal, to the VIDEO_FAIL node.
If an exception occurs downstream in the message flow and the message is 'rolled
back' to VIDEO_TDS_IN, the node passes the input message, via the Catch terminal,
to the VIDEO_FAIL node.
|
VIDEO_CWF_IN |
MQInput |
- Gets the input message from the input queue (also called VIDEO_CWF_IN).
- Passes the input message, via the Out terminal, to the Extract Fields node.
Alternatively, if there is a problem identifying the input message, VIDEO_CWF_IN
passes the input message, via the Failure terminal, to the VIDEO_FAIL node.
If an exception occurs downstream in the message flow and the message is 'rolled
back' to VIDEO_CWF_IN, the node passes the input message, via the Catch terminal,
to the VIDEO_FAIL node.
|
VIDEO_OUT |
MQOutput |
Puts the input message, which now contains information only about the customer's name and the videos that the customer has on loan, on the VIDEO_OUT queue. |
VIDEO_FAIL |
MQOutput |
If there is a problem processing the message, the input message is put on the VIDEO_FAIL queue. |
Extract Fields |
Compute |
- Extracts information from the input message about the customer's name and
the video that the customer has on loan.
- Multiplies the value of the Cost field in the input message by two.
- Passes the changed message, via the Out terminal, to the VIDEO_OUT node.
The message now contains information only about the customer's name and the
videos that the customer has on loan.
|
For more information, read about the nodes in the Video message flow in the WebSphere Message Broker documentation.
The input message contains information about the following:
- Customer name
- Customer address
- The type of identifier that is used as proof of identity when a customer opens an account with the video store
- The videos that are currently on loan to the customer: the name of the video, when it is due back, and the rental fee
- Whether the customer has a copy of this month's magazine
After the message has passed through the Video message flow, the message contains information only about the customer's name, and the videos the customer has on loan. In addition, the Extract Fields node has multiplied the value of the Cost field by two.
The purpose of putting the input message through the message flow is to show that the message can be parsed successfully in its various formats. It also demonstrates the ESQL syntax for referencing parts of a message that are in different namespaces. For more information, read about namespaces and ESQL in the WebSphere Message Broker documentation.
Back to sample home