How the MQGet node processes messages

The MQGet node processes each message that it receives.

Propagating the message

  1. If an MQ Message Descriptor header (MQMD) is present in the input tree, the MQGet node uses it. If not, the node creates a default MQMD.
  2. The node also creates a default MQ Get Message Options (MQGMO) structure based on the values that you have set for the node properties. If an MQGMO is present in the input tree, the node uses its content to modify the default one.
    When you include an MQGMO to override the default one, you must specify all the options that you are replacing. For example, if you set the option field to MQGMO_CONVERT, that value overrides all options that you set with the IBM® App Connect Enterprise Toolkit. If you do not use an overriding MQGMO, IBM App Connect Enterprise uses the following values:
    • If Wait interval is not zero, MQGMO_WAIT is set; otherwise, MQGMO_NOWAIT is used.
    • If Transaction mode is set to Yes, MQGMO_SYNCPOINT is used.
    • If Transaction mode is set to No, MQGMO_NOSYNCPOINT is used.
    • If Transaction mode is set to Automatic, MQGMO_SYNCPOINT_IF_PERSISTENT is used.
    • The only other option that is used by default in the node properties is MQGMO_COMPLETE_MSG, which is set if Transaction mode is set to Yes or No. This option is not set when your integration node is running on z/OS®.
    • No other options are used by default.
  3. The node makes the MQGet call to IBM MQ.
  4. The node analyzes the completion code (CC), and propagates the message to the appropriate terminal:
    OK
    The node creates the output LocalEnvironment and the output message trees using standard message-parsing techniques, then propagates the message to the Out terminal.
    Warning
    The node creates the output LocalEnvironment and the output message trees using BLOB as the message body type, then propagates the message to the Warning terminal, if it is connected. If the Warning terminal is not connected, no propagation occurs, and the flow ends.
    Fail (no message)
    The node creates the output LocalEnvironment and the output message trees by copying the input trees, then propagates the message to the No Message terminal, if it is connected. If the No Message terminal is not connected, 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 property, and the Copy Message or Copy Local Environment properties.
    Fail (other)
    The node propagates the message to the Failure terminal. If the Failure terminal is not connected, the integration node throws an exception and returns control to the closest upstream node that can process it. For more information, see Handling errors in message flows.

The following diagram shows this processing:

The process that is illustrated by this flow diagram is described in the preceding text.

Constructing OutputLocalEnvironment

  1. If the Generate Mode property on the MQGet node is set to an option that does not include LocalEnvironment, the node copies the input local environment tree to the output local environment tree.

    If this copy is made, any updates that are made in this node to the output local environment tree are not propagated downstream.

  2. If the Copy Local Environment property is set to an option other than None, the node copies the input local environment tree to the output local environment tree.
  3. If the output data location points to the output local environment tree, the node applies changes in that tree by copying from the result tree.
  4. The local environment tree is propagated.

The following diagram shows this processing:

The process that is illustrated by this flow diagram is described in the preceding text.

Constructing the Output message

  1. If the Generate Mode property on the MQGet node is set to an option that does not include Message, the node copies the input message tree to the output message tree. Go to step 5.
  2. If the Output Data Location property is set to OutputRoot, the node creates the output message tree entirely from the result tree. Go to step 5.
  3. If the Copy Message property is set to a value other than None, the node copies the input message tree to the output message tree.
  4. If the Output Data Location property points to a part of the output message tree, the node applies changes in that tree by copying from the result tree at the point that is defined by the Result Data Location property.
  5. The message tree is propagated.

The following diagram shows this processing:

The process that is illustrated by this flow diagram is described in the preceding text.

For an example of how this processing is implemented in a message flow, see How the MQGet node implements IBM MQ MQGet API calls.