Pattern 25 (Cancel Region)
The ability to disable a set of tasks in a process instance. If any of the tasks are already executing (or are currently enabled), then they are withdrawn. The tasks need not be a connected subset of the overall process model.
Stop any tasks in the Prosecution process which access the evidence database from running
Withdraw all tasks in the Waybill Booking process after the freight-lodgement task
The option of being able to cancel a series of (potentially unrelated) tasks is a useful capability, particularly for handling unexpected errors or for implementing forms of exception handling.
Figure 39: Cancel region implementation
The general form of this pattern is illustrated in Figure 39. It is based on the premise that every task in the required region has an alternate "bypass" task. When the cancellation of the region is required, the process instance continues execution, but the bypass tasks are executed instead of the original tasks. As a consequence, no further work occurs on the tasks in the cancellation region. However, as shown for the Cancel Case (WCP20) pattern, there are several alternative mechanisms that can be used to cancel parts of a process.
There are no specific context conditions associated with the pattern.
The concept of cancellation regions is not widely supported. Staffware offers the opportunity to withdraw steps but only if they have not already commenced execution. FLOWer allows individual tasks to be skipped but there is no means of cancelling a group of tasks. UML 2.0 Activity Diagrams is the only offering examined which provides complete support for this pattern: the InterruptibleActivityRegion construct allow a set of tasks to be cancelled. BPMN and XPDL offer partial support by enclosing the tasks that will potentially be cancelled in a subprocess and associating an error event with the subprocess to trigger cancellation when it is required. In both cases, the shortcoming of this approach is that the tasks in the subprocess must be a connected subgraph of the overall process model. Similarly BPEL only supports cancellation of tasks in the same scope hence it also achieves a partial rating. As COSA has an integrated notion of state, it is possible to implement cancellation regions in a similar way that presented in Figure 39 however the overall process model is likely to become intractable for cancellation regions of any reasonable scale hence this is viewed as partial support.
One issue that can arise with the implementation of the Cancel Region pattern occurs when the cancelling task lies within the cancellation region. Although this task must run to completion and cause the cancellation of all of the tasks in the defined cancellation region, once this has been completed, it too must be cancelled.
The most effective solution to this problem is to ensure that the cancelling task is the last of those to be processed (i.e. the last to be terminated) of the tasks in the cancellation region. The actual cancellation occurs when the task to which the cancellation region is attached completes execution.
An offering achieves full support if it provides a construct that satisfies the description for the pattern. It rates as partial support if the process model must be changed in any way (e.g. use of subprocesses, inclusion of bypass tasks) in order to accommodate cancellation regions.
To achieve a + rating (direct support) or a +/- rating (partial support) the product should satisfy the corresponding evaluation criterion of the pattern. Otherwise a - rating (no support) is assigned.
|Staffware||10||-||Not supported. Although steps can withdrawn (providing they have not already commenced), it is not possible to specify a region, i.e., a withdraw for each individual step is required and complications may occur in regard to routing elements (e.g., wait steps).|
|Websphere MQ||3.4||-||Not supported. A set of activities cannot be cancelled.|
|FLOWer||3.51||-||Not supported. There is no integrated means of cancelling a group of plans or plan elements.|
|COSA||5.1||+/-||Achievable by specifying a shadow cancellation activity for each activity in the cancellation region although the overall diagram is likely to be intractable for anything other than simple process models.|
|iPlanet||3.0||-||No means of cancelling a region of a process model.|
|SAP Workflow||4.6c||-||The process control step can terminate/cancel a specific activity of the whole process instance. It is not possible to cancel everything in a region other than by enumerating the region using a sequence of process control steps.|
|BPEL||1.1||+/-||No means of cancelling arbitrary groups of activities although activities within the same scope can be cancelled.|
|Websphere Integration Developer||6.0||+/-||No means of cancelling arbitrary groups of activities although activities within the same scope can be cancelled.|
|Oracle BPEL||10.1.2||+/-||No means of cancelling arbitrary groups of activities although activities within the same scope can be cancelled.|
|BPMN||1.0||+/-||Partially supported by enclosing the cancellation region in a sub-process and associating an error event with the sub-process to enable cancellation, however the cancellation region is restricted to a connected sub-graph of the overall process model.|
|XPDL||2.0||+/-||Partially supported by denoting the cancellation region as an activity set in a block activity and associating an error event with the block activity to enable cancellation, however the cancellation region is restricted to a connected subgraph of the overall process model.|
|UML ADs||2.0||+||Supported by the InterruptibleActivityRegion construct.|
|EPC (implemented by ARIS toolset 6.2)||-||Not supported. There is no cancellation feature.|
|jBPM||3.1.4||-||jBPM does not support this pattern.|
|OpenWFE||1.7.3||-||OpenWFE does not support this pattern.|
|Enhydra Shark||2||-||Enhydra Shark does not support this pattern. At design time it is not possible to define cancellation of regions, nor of block activities or sub-flows. (At run time, in the evaluated version of Shark, the options under Activity Management console, among them "terminate activity" which could be used for termination of block activities as of sub-flows as special cases of regions, are not enabled.)|