MQGet node message processing

The following diagrams illustrate the processing done within the MQGet node to:
  • Propagate the message
  • Construct the Output tree LocalEnvironment
  • Construct the Output tree message

Propagating the message

  1. If there is an MQMD in the input tree it is used, otherwise a default MQMD is used.
  2. A default MQGMO is created, then if there is a GMO in the input tree it is used to modify the default one according to the node attributes.
  3. The MQGet call is made to WebSphere MQ.
  4. The Return Code (CC) from the call is analysed, and the message propagated accordingly as follows:
    OK
    Create output LocalEnvironment and output Message trees using standard message-parsing techniques. Propagate to Out terminal.
    Warning
    Create output LocalEnvironment and output Message trees using BLOB as the message body type. If connected, propagate to Warning terminal. Otherwise, no propagation occurs and the flow ends.
    Fail (no message)
    Start of changeCreate output LocalEnvironment and output Message trees by copying the input. If connected, propagate to No Message terminal. Otherwise, no propagation occurs. The output message that is propagated to the No Message terminal is constructed from the input message only, according to the values of the Generate Mode and Copy Message, or Copy Local Environment properties.End of change
    Fail (other)
    Propagate to Failure terminal. If the Failure terminal is not connected the broker throws an exception and returns control to the closest previous node that can process it. See Handling errors in message flows for more information.

The following diagram illustrates this visually:

The diagram is described in the text above.

Constructing the Output LocalEnvironment

  1. If the generateMode attribute on the MQGet node is not one of the options that includes LocalEnv, then set the output local environment to be the input, and propagate the local environment.
    Note: In this case, no updates that go into OutputLocalEnvironment will be propagated downstream.
  2. Otherwise, if the copyLocalEnv attribute is not set to none, then copy the input local environment into the output.
  3. If the output data location points to the output local environment, then changes are inserted here by copying from the result tree.
  4. The local environment is propagated.

The following diagram illustrates this visually:

The diagram is described in the text above.

Constructing the Output message

  1. If generateMode does not include message, then set the output message to be the input one. Goto step 5.
  2. If output Data Location is set to OutputRoot, then create the output message entirely from the result tree. Goto step 5.
  3. If copyMessage is not set to none, then copy the input message into the output message tree.
  4. If the output data location points to a part of the output message tree, then changes are inserted here by copying from the result tree at the point defined by result Data Location.
  5. The message is propagated.

The following diagram illustrates this visually:

The diagram is described in the text above.

For detailed examples of how to exploit this, see Using an MQGet node in a request-response flow.

Related concepts
Message flows overview
Related reference
Using an MQGet node in a request-response flow
MQGet node