Page 254 -
P. 254
248 M. Adams
1. The Engine starts a case. The internal objects of the case instance are created
and initialized using the process definition (i.e., the specification) as a template.
2. A root net is created and a token is placed in its initial input condition.
3. A net runner is created for the net.
4. The net runner determines which task(s) are enabled by the token in the input
condition(s). For each enabled composite task, a new subnet is created (or, in the
case of multiple instance composite tasks, a specified number of subnets are cre-
ated), a token is placed in each net’s initial input condition, and the cycle returns
to Step 3 for each subnet. For each enabled atomic task, a work item is created,
and the Engine announces an enabled work item event to the appropriate Custom
Service.
5. The Custom Service responds to the event by requesting to check-out the work
item from the Engine (via Interface B).
6. For a single instance atomic task, the Engine spawns a copy (or child)of the
work item. For a multiple instance atomic task, the specified number of child
work items are created.
7. The Engine maps data values from the net-level data to each data variable of
each work item, according to the XQuery defined for each variable’s input
predicate.
8. The Engine moves one child work item to Executing status (see Sect. 9.5) and
passes that work item back to the Custom Service, as a response to the check-out
request.
9. For multiple instance atomic tasks, the remaining children are created with Fired
status. The Custom Service sends a check-out request for each of the remaining
child work items; the Engine responds by moving each to Executing status and
passing it to the Custom Service.
10. The Engine waits (with regards to that particular process) until such time as
the Custom Service checks-in each of the checked-out work items back to the
Engine. The Engine is unconcerned with exactly how the work item’s work has
been performed by the service.
11. For each checked-in work item, the Engine maps data values from each of its
data variables back to the net-level data parameters, according to the XQuery
for each variable’s output predicate.
12. The Engine completes the work item. If there are still outstanding child work
items for the task, the cycle returns to Step 10.
13. When all child work items have been checked in to the Engine, the Engine
completes the task and produces a token in each of its output conditions.
14. The cycle returns to Step 4 and continues until either a token in the net has
reached the final output condition (normal completion); there are tokens left in
the net but no tasks are enabled (deadlock); or the case is canceled.
15. If a token has reached the net’s final output condition, the Engine completes the
net.
16. If the completing net is a subnet (i.e., created from a composite task), the
final net-level data parameter values are mapped back to the parent net via the
task’s output parameters, according to the XQuery for each parameter’s output