Process Execution
Process Instance Execution
Process execution consists of the sequential creation, execution, and termination of the activities specified in a process definition. When an activity is created, it remains in a PENDING state until its trigger conditions are fulfilled. In general, the activity then passes through READY and ACTIVE states, as shown in Figure
The activity creation, execution, and termination stages are each discussed below.
Activity Creation
The engine creates an instance of an activity in the following situations:
•A new process is
•A completed activity’s router points to an activity and the router method returns TRUE.
•An aborted activity’s router points to an activity and the router method returns TRUE.
•An expired timer’s router points to an activity and the router method returns TRUE.
In the last three cases, the engine creates an activity, and places in a PENDING state. However, if the target activity already exists in a PENDING state, a new instance is not created. (If the activity already exists in a READY or ACTIVE state, a new instance is created and placed in a PENDING state.)
The engine executes the trigger method of a PENDING activity in the following situations:
•The activity is first created
•The router method of a router pointing to the activity returns TRUE
•A process attribute for the process instance changes value
Chapter 6 Managing Process Execution 167