Process Execution

Session assignment takes place in any of the following situations:

An offered activity is placed in a READY state for the first time.

An offered activity is rolled back from an ACTIVE state to a READY state—can occur if a client application rolls the activity back to READY state (discards any work performed on the activity), if a system manager rolls the activity back to READY state in order to force it to be reassigned, or if the activity is being performed by a session that is suspended and the client has set the suspendAction property to REMOVE (that is, remove the activity from the session’s activity list if the session is suspended).

A new session is opened (or reverts from SUSPENDED to ACTIVE)—the engine examines the list of READY Offered activities and assigns them to the newly active session based on each activity’s assignment rules.

Transition to ACTIVE State The engine places an Offered, READY activity in an ACTIVE state when a client application accepts the corresponding work item. The engine removes the activity from all sessions to which it is assigned except the one which accepts the corresponding work item.

The engine provides the client application with the associated application dictionary item (a reference to the application or service needed to perform the activity, a description of the work to be performed, and any required process attribute data). The engine ensures that any required process attributes are locked so that no other session can access them during performance of the activity.

ACTIVE State Handling The engine performs any work specified in the OnActive method (if one exists in the process definition).

The client application that accepted the activity is responsible for completing the work associated with the activity. When the client determines that the work is complete, it informs the engine, which removes the activity from the session’s activity list and places the activity in a COMPLETED state.

The client can abort work by requesting that the engine place the activity in an ABORTED state, or the client can also reset the activity to READY state (discarding any work performed on the activity, including changes in attribute values).

Queued Activities

Transition to READY State When the trigger conditions are met, the engine performs any work specified in the Ready method (if one exists in the process definition) and places the activity in READY state.

Chapter 6 Managing Process Execution 169

Page 169
Image 169
Sun Microsystems 3 manual Queued Activities