Select Automatic and
specify the length of time (in seconds) during which the node collects
messages, before it identifies the message that contains the smallest
sequence number. When the smallest number has been determined, that
sequence number becomes the first in the message sequence. For
example, assume that you have a
Resequence node with the following
properties:
- Path to sequence number property
with a value of /doc/seq
- Path to sequence group identifier property
with a value of /doc/grp
- Start of sequence definition property
set to Automatic with
a value of 5. This value
means that, for any new group, the Resequence node collects messages
for 5 seconds before determining the starting sequence number.
- End of sequence definition property
set to Automatic with
a value of 60. This value
means that, for any new group, the Resequence node waits for 60
seconds before determining the ending sequence number.
The following messages are received by the
Resequence node:
<doc><grp>a<grp><seq>5</seq></doc>
<doc><grp>a<grp><seq>4</seq></doc>
<doc><grp>a<grp><seq>3</seq></doc>
<doc><grp>a<grp><seq>2</seq></doc>
<doc><grp>b<grp><seq>0</seq></doc>
<doc><grp>b<grp><seq>2</seq></doc>
At this point, the automatic period for the start of sequence
expires (5 seconds), then the following messages are received:
<doc><grp>a<grp><seq>6</seq></doc>
<doc><grp>b<grp><seq>3</seq></doc>
For
group
a, the following messages are propagated
to the Out terminal after 5 seconds:
<doc><grp>a<grp><seq>2</seq></doc>
<doc><grp>a<grp><seq>3</seq></doc>
<doc><grp>a<grp><seq>4</seq></doc>
<doc><grp>a<grp><seq>5</seq></doc>
<doc><grp>a<grp><seq>6</seq></doc>
For
group
b, the following message is propagated to
the Out terminal after 5 seconds:
<doc><grp>b<grp><seq>0</seq></doc>
No more messages are received before a missing message
timeout occurs, at which point the following messages are propagated
to the Expire terminal:
<doc><grp>b<grp><seq>2</seq></doc>
<doc><grp>b<grp><seq>3</seq></doc>
Select Predicate and
specify an XPath expression to calculate whether the message is the
first in the sequence. The predicate evaluates to either True or False,
and 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.For example,
you might specify the following XPath expression:
/Employee/EmpStartSeq="10"
When
the input message field
EmpStartSeq contains the
value
10, the start of sequence predicate is evaluated
to True, and the message is identified as the first in the sequence:
<Employee>
<EmpStartSeq>10</EmpStartSeq>
</Employee>
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.