Page 178 -
P. 178
168 M. Adams and N. Russell
Continue All Cases: Unsuspends execution of all work items previously sus-
pended for all cases of the specification in which the task of which the work
item is an instance is defined or of which the case is an instance, effectively
continuing all previously suspended cases of the specification.
Restart Work Item: Rewinds work item execution back to its start. Resets the
work item’s data values to those it had when it began execution.
Force Complete Work Item: Completes a “live” work item. Execution of the
work-item ends, and the work item is marked with a status of ForcedComplete,
which is regarded as a successful completion, rather than a cancelation or failure.
Execution proceeds to the next work item on the process path.
Force Fail Work Item: Fails a “live” work item. Execution of the work item ends,
and the work item is marked with a status of Failed, which is regarded as an
unsuccessful completion, but not as a cancelation – execution proceeds to the
next work item on the process path.
Compensate: Run one or more compensatory processes (i.e., worklets). Depend-
ing on previous primitives, the worklets may execute simultaneously to the parent
case, or execute while the parent is suspended.
A number of compensatory worklets may be executed consecutively by adding
a sequence of compensation primitives to an exlet. Optionally, a particular com-
pensation primitive may contain an array of worklets – when multiple worklets
are defined for a compensation primitive via the Rules Editor, they are launched
concurrently as a composite compensatory action when the exlet is executed.
As mentioned in Chap. 4 with regards to the Selection Service, worklets can in
turn invoke child worklets to any depth – this also applies for worklets that are exe-
cuted as compensatory processes within exlets. The primitives “Suspend All Cases,”
“Continue All Cases,” and “Remove All Cases” may be flagged when being added
to an exlet definition via an option in the Rules Editor so that their action is restricted
to ancestor cases only. Ancestor cases are those in a hierarchy of worklets back to
the original parent case – that is, where a process invokes an exlet that invokes a
compensatory worklet, which in turn invokes another worklet and/or an exlet, and
so on (see the “TimeOut” example in Chap. 11). Also, the “Continue” primitives
are applied only to those corresponding work items and cases that were previously
suspended by the same exlet.
Execution moves to the next primitive in the exlet when all worklets launched
from a compensation primitive have completed.
In the same manner as the Selection Service, the Exception Service also supports
data mapping from a case to a compensatory worklet and back again. For example,
if a certain variable has a value that prevents a case instance from continuing, a
worklet can be run as a compensation, during which a new value can be assigned
to the variable and that new value mapped back to the parent case, so that it may
continue execution.
Referring back to Fig. 5.6, the center tier shows the exlets defined for Item-
PreConstraint violations. As mentioned earlier, there may actually be up to eight
different members of this tier. Also, each exlet may refer to a different set of