Sun Microsystems 3 manual Activity Termination, Automatic Activities

Models: 3

1 368
Download 368 pages 47.9 Kb
Page 171
Image 171

Process Execution

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

An active subprocess activity is handled differently depending on whether the subprocess activity is synchronous or asynchronous.

Synchronous—waits for completion of the new process:

If the subprocess activity is synchronous and if the new process is successfully created, the subprocess activity remains in an ACTIVE state (in the parent process), awaiting completion of the subprocess. If the subprocess fails to complete for any reason, the subprocess activity is placed in an ABORTED state.

Asynchronous—does not wait for completion of the new process:

If the subprocess activity is asynchronous and if the new process is successfully created, the subprocess activity is placed in a COMPLETED state (in the parent process). If the subprocess is not successfully created, the subprocess activity is placed in an ABORTED state.

Automatic 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 a READY state.

READY State Handling An automatic activity passes directly from a READY to an ACTIVE state without being assigned to sessions.

Transition to ACTIVE State In the case of an automatic activity, the engine places the activity directly in an ACTIVE state from a READY state without assigning it to sessions because the work of the activity is invoked or performed by the engine rather than by a client application.

ACTIVE State Handling The engine performs the automatic activity’s OnActive method when the activity is placed in an ACTIVE state. The work performed by the activity is invoked or coded in the OnActive method within the process definition. When the OnActive method is fully executed and returns TRUE, the activity is placed in a COMPLETED state.

Activity Termination

Activity termination occurs when the engine places an activity in either a COMPLETED state or an ABORTED state.

Chapter 6 Managing Process Execution 171

Page 171
Image 171
Sun Microsystems 3 manual Activity Termination, Automatic Activities