Modifying a message flow

This topic contains an overview and procedure for modifying a message flow.

Overview of modifying a message flow

When a WebSphere Business Integration adapter uses a message broker, the adapter uses WebSphere MQ message flows to process and route data. A single message flow, defined for each queue, processes all messages placed on that queue. Using the Message Brokers Toolkit, you can configure a message flow to specify different processing steps for each type of message it is expected to handle.

You must modify the message flow so that each incoming message is converted to the format that corresponds to the configured data handler. This conversion must occur before the message is issued to the input queue of the connector. The procedure below shows how to modify a message flow for an XML configuration. To modify a message flow for other data formats, substitute the formats mime type for XML in the third bullet of step 2.

Steps for modifying a message flow for an XML configuration

Before you begin: Configure the XML data handler.

To modify a message flow for XML, do the following:

  1. Launch Message Brokers Toolkit.
  2. Add a compute node to the end of a message flow.
  3. Enter fields in the ESQL text region as follows:
    Set OutputRoot = InputRoot;
    

    This copies the message for output.

    Set OutputRoot.MQHRF2.Format = 'SO-CR';
    

    This assures that the connector will check this format and convert the message appropriately.

    SET OutputRoot.Properties.MessageFormat = 'XML';
    

    This indicates to WebSphere Business Integration Message Broker that the message should be converted to XML upon delivery.

  4. Click Apply to enable the compute node.

Figure 5 shows a sample view of a compute node configured to translate an incoming message to a format that the connector can understand. Once this compute node is enabled, an XML document representing the original message is issued to the connector input queue.

Figure 5. Setting the message format to XML


Note:
If you have defined a custom format in the WebSphere Business Integration Message Broker Repository Manager, you can convert the legacy format to XML by simply setting the message format to XML. This format is different from the MQHRF2. The OutputRoot.Properties.MessageFormat relates to the MRM, while OutputRoot.MQHRF2.Format is used to specify a message format for an application that is receiving messages.

Copyright IBM Corp. 1997, 2004