Sequence node

Use the Sequence node to add a sequence number to one or more groups of input messages.

Information about the state of in-flight messages is held on storage queues that are controlled by IBM® MQ. If you are using message sequencing on an integration server that is managed by an integration node, you must install IBM MQ on the same computer as your integration node in order to use the capabilities that are provided by the Sequence node. The storage queues that hold the state information are owned by the queue manager that is associated with the integration node.

If you are using message sequencing on an independent integration server, you can use a remote default queue manager to control the system queues, without the need to install IBM MQ on the same machine as the integration server. Interactions between an independent integration server and IBM MQ can use a client connection to a remote queue manager, by using a default policy setting. For more information about using a remote default queue manager, see Using a remote default queue manager and Configuring an integration server to use a remote default queue manager.

For more information about the queues that are required by the Sequence node, see Using message sequences.

This topic contains the following sections:

For information about how to configure this node, see Configuring the Sequence node.

Purpose

The Sequence node enables you to receive groups of messages from an input source, and preserve the order in which the messages in each group arrived.

Use a Sequence node to generate a monotonically increasing sequence number for each sequence group. As each message in the group arrives at the Sequence node, the sequence number for the group is incremented and stored with the message in a location specified by the node property Path to store sequence number (for example, LocalEnvironment, MQRFH2 header, message body).

The sequencing applies to messages within the same sequence group only. You can use properties in the Sequence node to organize messages into groups according to a specified condition; for example, grouping all messages with the same value in a customer number field in the message. If no sequence group is specified, a single default group is used for all messages.

A Sequence node can receive input from multiple input nodes in the message flow or from input nodes that have additional instances. The Sequence node can process multiple sequence groups in parallel, but it processes only one request at a time for sequence numbers from the same sequence group.

The Sequence node allocates a sequence number to each message in a sequence group, and the next sequence number in the group is not allocated until the current message in the group has finished processing (either by being committed or rolled back). Only one thread at a time can process messages in the same sequence group downstream of the Sequence node, which ensures that sequencing is maintained for the group when there are multiple threads in the message flow.

When the Sequence node receives messages from multiple threads, the order in which the messages reach the Sequence node is preserved. However, the order in which the messages arrive at the Sequence node might be different from the order in which they are taken from the transport by the input node. This situation can occur because messages on one thread might be overtaken by messages on other threads between the input node and Sequence node.

Each sequence group can be associated with only one Sequence node. Multiple Sequence nodes can have a sequence group with the same name, but each of those sequence groups is treated as a separate group. The combination of the integration server name, message flow name, node name, and sequence group name is used to differentiate between the sequence groups.

For example, you might have a message flow called flow1 containing a Sequence node called node1, which is deployed to an integration server called eg1. A message is sent to it using a sequence group called group1. The result is eg1/flow1/node1/group1. Exactly the same message flow in a different integration server, for example eg2, would result in eg2/flow1/node1/group1.

The Sequence node is contained in the Routing drawer of the palette, and is represented in the IBM App Connect Enterprise Toolkit by the following icon:

Sequence node icon

Terminals and properties

The terminals of the Sequence node are described in the following table.

Terminal Description
In The input terminal through which the incoming message assembly arrives at the node.
Failure The output terminal to which the message is routed if an error occurs. This value includes failures caused by retry processing.
Out The output terminal to which the output message is propagated by default.

The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the BAR file for deployment).

The Description properties of the Sequence node are described in the following table.

Property M C Default Description
Node name No No Sequence The name of the node.
Short description No No   A brief description of the node.
Long description No No   Text that describes the purpose of the node in the message flow.

The Basic properties of the Sequence node are described in the following table.

Property M C Default Description
Path to store sequence number No No
$OutputLocalEnvironment/
Sequence/Number
An XPath expression that specifies the location in which to save the sequence number of the message.
Path to sequence group identifier No No Not set An XPath expression that points to the location of the sequence group identifier. Messages that have the same group identifier are considered part of the same sequence group. This property functions in the same way as the Correlation path property in the Collector node.
Start of sequence definition Yes No 0 Specifies the first sequence number in each group. Valid values are positive or negative integers. The default value is 0.
End of sequence definition Yes No Automatic Specifies when each sequence group has been completed. Valid values are:
  • Literal and number
  • Predicate and XPath
  • Automatic and time in seconds
The default is Automatic.

The Advanced properties of the Sequence node are described in the following table.

Property M C Default Description
Persistence mode Yes No Non-persistent Specifies whether to store sequence group state persistently. Valid options are:
  • Non-persistent
  • Persistent
The Monitoring properties of the node are described in the following table.
Property M C Default Description
Events No No None Events that you have defined for the node are displayed on this tab. By default, no monitoring events are defined on any node in a message flow. Use Add, Edit, and Delete to create, change or delete monitoring events for the node.

You can enable and disable events that are shown here by selecting or clearing the Enabled check box.