Page 48 -
P. 48
2 The Language: Rationale and Fundamentals 35
Multiple Instances allows additional instances to be added at runtime and supports a
different types of synchronization condition that does not necessarily need to relate
to the number of instances that have completed.
Multiple instance patterns address concurrency for a single task. The concurrency
patterns extend this notion to a group of tasks.
Concurrency Patterns
Concurrency patterns denote situations involving restrictions on the extent of con-
currency that is permissible between a group of tasks in a process. The most
restrictive of these patterns is the Sequence which requires that a group of tasks
cannot execute concurrently and furthermore that they must execute in a specified
order. The Interleaved Parallel Routing pattern relaxes the total ordering require-
ment, allowing the overall set of tasks to be broken into subsets of tasks where each
group has a specific ordering. Tasks from these subgroups can then execute (poten-
tially on an interleaved basis) until all of them have executed, provided no tasks
execute concurrently at any time. The Interleaved Routing pattern further relaxes
the concurrency constraints for the group of tasks requiring only that none of the
tasks execute concurrently. They may execute in any order and all of them must exe-
cute exactly once. Analogous to this pattern is the Critical Section pattern, which
requires that two or more regions of a process model are identified such that the
thread of control can only be active in one of these regions at any time. The final
pattern in this group is the Milestone, which requires that the execution of a nomi-
nated task only be allowed to proceed when the process has reached a specific state
(typically denoted by the thread of control in a distinct branch being at a specific
point).
The concurrency patterns focus on restrictions on concurrent execution between
tasks or groups of tasks. The next set of patterns denote mechanisms for actively
intervening in the execution of a task or process instance to bring it to a final state
either through termination or completion.
Cancelation and Completion Patterns
This group of patterns identifies various mechanisms for triggering the cancelation
or completion of tasks. For each of them, the cancelation/completion action must be
triggered from within the process. Five distinct patterns of this form are denoted:
Cancel Task identifies the cancelation of a specific (atomic) task. If it is active
when the cancelation is effected, its execution is terminated and recorded as hav-
ing completed unsuccessfully. The canceled task does not trigger any subsequent
tasks.
Cancel Case indicates the cancelation of all active task instances in a case.
Once triggered, these tasks are terminated and are recorded as having terminated