TimerCancel node


The TimerCancel node icon

This page contains information on:

The TimerCreate and TimerCancel nodes are a pair of nodes that allow timer instances to be created and destroyed.  A timer instance can be thought of as an object that periodically generates a timer event message.

The TimerCancel node is responsible for searching the local or global timer instance chains looking for any timer which matches the specified search criteria.  By default, the CorrelId of the cancellation message is used to match against the MsgId of the timer instance creation message, however a number of other matching options are also available.  Optionally, a timer name may be specified in which case the search is confined to timer instances with the same name and MsgId and CorrelId values are ignored.  If specified, the timer name can be either a literal value or a derived value, i.e. a value extracted from the cancellation message at runtime.

The TimerCancel node has one input terminal called in and three output terminals, out, noMatch and failure.  When a cancellation message is received in the input terminal, the node extracts both the MsgId and CorrelId values and performs a search of the timer instance chains based on the search criteria specified by the MatchOn property.  Alternatively, if the TimerName attribute was specified, the setting of the MatchOn attribute is ignored and the search is confined to timer instances with matching names.  Any matching timer instances are cancelled and deleted from storage and the cancellation message is then propagated to the out terminal.  If no matching postits are found, the message is propagated to the noMatch terminal.  If a derived value is specified for the TimerName attribute and the node fails to locate the specified syntax element, or it contains no data, the cancellation message is propagated to the failure terminal and a message logged to the MQSI V2 message log.  All other errors result in the cancellation message being propagated to the failure terminal.
 

Node terminals

The TimerCancel node provides the following terminals:
 
 
in The input terminal that accepts a cancellation message for processing by the node.
out
The output terminal to which the unchanged cancellation  message is propagated if the node successfully cancels at least one timer instance.
noMatch The output terminal to which the cancellation message is sent if no matching timer instances can be found.
failure The output terminal to which the cancellation message is propagated if any other errors are encountered.

Configuring the TimerCancel node

When you have put an instance of the TimerCancel node into a message flow you can configure it. Right click on the node in the Message Flow Definition pane and select Properties. Click on the Basic tab and (optionally) enter the name that you wish to give the postit. By giving the postit a name you can associate this TimerCancel node with postits created by a PostitCreate node with a matching name.  You must also specify further matching criteria that will match existing postits with the input message.  You must specify the name of the syntax element into which the postit data should be copied (the name must begin with 'Root.').

TimerCancel node properties

TimerName   Optional value used to identify the timer instance to be cancelled.  If a name is specified, the value of the MatchOn attribute is ignored.  In this case, only timer instances with a matching name will be eligible to be cancelled.

The TimerName value can be a literal or a derived value, i.e. a value to be extracted from the cancellation message.  For the latter, the value specified for the TimerName attribute must begin with either 'Root' or 'Root.'.

MatchOn  CorrelId=OldMsgId
    Enumerated value indicating how the input message attributes should be used to find matching timer instances.  The possible values are
     
  • CorrelId=OldMsgId – the CorrelId value of the input message must match the MsgId value of the original message that created the timer instance (this is the default value)
  • MsgId=OldMsgId – the MsgId value of the current message must match the MsgId value of the original message that created the timer instance
  • CorrelId=OldCorrelId – the CorrelId value of the current message must match the CorrelId value of the original message that created the timer instance
  • MsgId =OldCorrelId – the MsgId value of the current message must match the CorrelId value of the original message that created the timer instance
  • MsgId+CorrelId=OldMsgId+OldCorrelId – the combined MsgId and CorrelId values of the current message must match the combined MsgId and CorrelId values of the original message that created the timer instance

Click on the Advanced tab and (optionally) modify the scope of the timer.
 
 
TimerScope Execution Group The value set for this property determines the scope of the timer instance.  It can take 2 possible values 
  • ExecutionGroup – only timer instances within the same Execution Group will be eligible to be cancelled by this node.  This is the default value.
  • Broker - the search will include both local timer instances and global timer instances, i.e. those visible to all message flows in the broker domain.
  • Platform - the search will include both local timer instances and global timer instances, i.e. those visible to all message flows in all Brokers running on the current platform.



© IBM Corporation 2001. All Rights Reserved