Configuring the Resequence node

Configure the Resequence node to control the sequence in which groups of incoming messages are propagated in a message flow.

About this task

When you have put an instance of the Resequence node into a message flow, you can configure it; see Configuring a message flow node. The properties of the node are displayed in the Properties view. All mandatory properties that do not have a default value defined are marked with an asterisk.

To configure the Resequence node, set the following properties.

Procedure

  1. Optional: On the Description tab, enter a Short description, a Long description, or both. You can also rename the node on this tab.
  2. On the Basic tab, set the properties that determine how the message sequence is controlled.
    • Use the Path to sequence number property to specify an XPath expression that is used to calculate the sequence number of the message. The XPath expression can calculate the sequence number or it can point to an integer field in the message. Messages can also contain an optional sequence group identifier. This property is mandatory.
    • Use the Path to sequence group identifier property to specify the location of the sequence group identifier. The location is specified as an XPath expression. Messages that have the same group identifier are considered part of the same sequence group.
    • Use the Start of sequence definition property to identify the first sequence number in each group.
      • Select Literal to specify a literal sequence number, which can be any positive or negative numeric value. When the message with the specified sequence number arrives, the messages are propagated.
      • Select Predicate to specify an XPath expression that evaluates to either True or False, indicating whether the message is the first in the sequence.

        Messages continue to be collected while the expression evaluates to False. When the expression of a message is evaluated to True, it indicates that the message is the first in the sequence.

        Typically, the XPath expression evaluates to a Boolean; however, if other data types are returned, the predicate is determined in the following way:
        Table 1.
        Returned data type True False
        Boolean True False
        Numeric Any non-zero value 0 or 0.0
        String Any string matching true (case-insensitive) Any string not matching true (case insensitive)
        NodeSet Never Always

        When a message evaluates the expression to True (and is therefore identified as the start of the sequence), the node checks that the message has the smallest sequence number collected up to that point. If messages are found with lower sequence numbers, an exception is thrown.

        When the first message that evaluates to true has been processed successfully, the XPath expressions of subsequent messages are not checked. If a message arrives with a lower sequence number than the message that was identified as the start of the sequence, an exception is thrown.

      • Select Automatic to specify a time limit for gathering messages before using the lowest numbered message.
    • Use the End of sequence definition property to specify when each sequence group has been completed.
      • Select Literal to specify a literal sequence number. This value can be any positive or negative numeric value that is equal to or greater than the value of the Start of sequence definition property. When the message with the specified sequence number arrives, the sequence group remains open and waits for missing messages until the Missing message timeout property expires. Any messages that arrive within that time are included in the group (unless they are duplicates or outside the allowed range) until the sequence group is closed. When the sequence group is closed, any new messages arriving for that group are treated as belonging to a new instance of the group.
      • Select Predicate to specify an XPath expression that evaluates to either True or False, to indicate whether the message is the last in the sequence.

        Typically, the XPath expression evaluates to a Boolean; however, if other data types are returned, the predicate is determined in the way shown in Table 1.

        When the predicate evaluates to True, the sequence number of the message is assigned to the End of sequence definition property.

        When a message has been received with the end of sequence predicate set to True, the sequence group remains open and waits for missing messages until the Missing message timeout property expires. Any messages that arrive within that time are included in the group (unless they are duplicates or outside the allowed range) until the sequence group is closed. When the sequence group is closed, any new messages arriving for that group are treated as belonging to a new instance of the group.

        If a message arrives with the end of sequence predicate set to True and with a lower sequence number than a message that has already arrived, an exception is thrown.

      • Select Automatic to specify the timeout period for the node. This option specifies how long (in seconds) the node waits for messages to arrive in an empty queue, before closing the sequence group. This option is useful for applications that cannot determine the final number in the sequence. The timer starts when there are no messages in the queue waiting to be propagated. If new messages arrive before the timeout period is reached, the timer is canceled. If no new messages arrive before the end of the specified time, the sequence group is closed and any further messages for the group are considered part of a new group.
    • Use the Missing message timeout property to specify how long (in seconds) the node waits for the next message in the sequence before it moves on to the next message in the sequence. Messages that arrive within the specified time limit are propagated in sequential order to the Out terminal.

      When the specified time limit has been exceeded, the messages are propagated in sequential order to the Expire terminal. Subsequent messages in the sequence group are also routed to the Expire terminal. If the missing message eventually arrives, it is propagated to the Missing terminal.

  3. On the Advanced tab, set the following properties:
    • Use the Persistence mode property to specify whether to store incomplete sequences of messages persistently.
    • Use the Policy property to specify the name of a Resequence policy that overrides specified properties of the Resequence node.
  4. Optional: On the Instances tab, set values for the properties that show the additional instances (threads) that are available for a node.

    Multiple threads can be used to propagate messages from the same Resequence node, but only if each message that is being propagated belongs to a different sequence group. For messages belonging to the same sequence group, only one thread at a time can be used to propagate messages. As a result, the sequential order of messages in a sequence group is preserved, but no order between groups is maintained.

    For more information about specifying additional instances, see Configurable properties in a BAR file.