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 6-1 on page 164, to a COMPLETED state. When the activity is completed, its router methods are executed and succeeding activities are created, continuing the process execution process.

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 created—the engine creates a First activity, passes it through PENDING, READY, and ACTIVE states, and places it directly into a COMPLETED state.

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

Page 167
Image 167
Sun Microsystems 3 manual Process Instance Execution, Activity Creation