State Transitions – An Illustration

Let’s use a simple example in order to understand state transitions of processes, stages, and activities.

Consider a medical exam process with two stages, Diagnosis and Treatment. Both these stages contain two activities each as shown in the following figure:

Description of dp-example.png follows
Description of the illustration dp-example.png

The following table provides additional details of the plan items:

Plan Item Markers and Conditions

Diagnosis stage

The Required marker is enabled.

Treatment stage

The Required and Auto Complete markers are enabled.

In addition, an activation condition is also defined specifying that this stage is activated only after the previous stage is Complete.

Request Examination activity

The Required marker is enabled.

Diagnose Patient activity

The Required and Manual Activation markers are enabled.

In addition, an enablement condition is also defined specifying that this activity is enabled only after the Request Examination activity is Complete.

Prescribe Medicine activity

The Manual Activation marker is enabled but no enablement condition is specified.

Note: The Required marker is disabled.

General Advice activity

The Required marker is enabled.

When a process participant starts the application and instantiates the process, the following sequence of state transitions take place:

  1. The process enters the Active state and both stages enter the state Available.

  2. Because the Diagnosis stage is not manually activated and has no activation conditions, it immediately turns Active. However, the Treatment stage remains in the Available state until its activation condition is fulfilled. The activities within these stages undergo following transitions:

    1. The Request Examination activity becomes Available, and it subsequently turns Active because there are no conditions for its activation.

    2. The Diagnose Patient activity remains in the Available state until its enablement condition is fulfilled.

    3. Both the activities under the Treatment stage are not instantiated at this point in the process.

    Note that all the above transitions occur simultaneously as soon as the process is activated. The following diagram depicts states of the process instance and its plan items at this point in execution:

    Description of dp-state-example1.png follows
    Description of the illustration dp-state-example1.png

  3. Now, the patient provides the required information and completes the Request Examination activity.

  4. This fulfills the enablement condition of the Diagnose Patient activity, and it transitions to the Enabled state.

    The following diagram depicts the current state of the Diagnosis stage:

    Description of dp-state-example2.png follows
    Description of the illustration dp-state-example2.png

  5. In the Enabled state, the Diagnose Patient activity awaits a relevant process participant to manually activate it. In this case, a medical practitioner starts this activity. The practitioner makes a diagnosis, records observations, and completes the activity.

  6. With both activities within it being Complete, the Diagnosis stage also enters the Complete state.

  7. This fulfills the activation condition for the Treatment stage and it becomes Active.

    1. Subsequently, both activities under this stage become Available.

    2. The Prescribe Medicine activity, in turn, enters the Enabled state. The medical practitioner starts this activity only if necessary.

    3. The General Advice activity, however, becomes Active because there are no conditions for its activation.

    The following diagram shows states of the process instance and its plan items at this point in execution:

    Description of dp-state-example3.png follows
    Description of the illustration dp-state-example3.png

  8. Consider this treatment scenario where the practitioner decides not to start the Prescribe Medicine activity and completes only the General Advice activity.

  9. Even though the Prescribe Medicine activity is still in the Enabled state, the Treatment stage is automatically marked Complete because of the following reasons:

    1. No activity within the stage is Active. In addition, all activities which are marked Required have been completed. In this case, the General Advice activity is Complete.

    2. The Auto Complete marker is enabled for this stage.

  10. With both stages marked Complete, the process is marked Complete as well.

    The following diagram shows final states of the process instance and its plan items:

    Description of dp-state-example4.png follows
    Description of the illustration dp-state-example4.png