SCXML-tutorial

Contents Overview Examples Editor Forum

<cancel>

The element is used to cancel a delayed <send> event. The SCXML Processor must not allow <cancel> to affect events that were not raised in the same session. The Processor should make its best attempt to cancel all delayed events with the specified id. Note, however, that it can not be guaranteed to succeed, for example if the event has already been delivered by the time the <cancel> tag executes.

Example:

<cancel sendid="ID_TIMER"/>

TimerGenerator

Attribute Details

NameRequiredAttribute ConstraintsTypeDefault ValueValid ValuesDescription
sendidfalseMust not occur with sendidexpr.IDREFnoneThe sendid of a delayed eventThe ID of the event(s) to be cancelled. If multiple delayed events have this sendid, the Processor will cancel them all.
sendidexprfalseMust not occur with sendid.Value ExpressionnoneAny expression that evaluates to the ID of a delayed eventA dynamic alternative to ‘sendid’. If this attribute is present, the SCXML Processor must evaluate it when the parent <cancel> element is evaluated and treat the result as if it had been entered as the value of ‘sendid’.

W3C IRP tests

1. Test 207

The SCXML Processor MUST NOT allow cancel to affect events that were not raised in the same session.

test207

test207 - child

2. Test 208

The Processor SHOULD make its best attempt to cancel all delayed events with the specified id.

test208

3. Test 210

If the 'sendidexpr' attribute is present, the SCXML Processor MUST evaluate it when the parent cancel element is evaluated and treat the result as if it had been entered as the value of 'sendid'.

test210

TOP Contents Overview Examples Editor Forum