Introduction to the workflow of a state machine
A state machine workflow consists of a set of states. A state is indicated as the initial state. Each state can receive a specific set of events. Depending on the event, you can switch to another state. The state machine workflow can have a final state. When transitioning to the final state, the workflow completes.
[One] State machine designer view
The state machine Designer is a free-form designer, which means you can move activities freely on the design surface.
The state machine designer has two views: |
(1) "Status" view (2) "Event-driven" view |
The Status view displays the status activity and event-driven activities that can be contained within the State activity. In this view, transitions from one state to another are represented by lines, which extend from event-driven activity in one state to another state.
You can also create a transition from a State activity to another State activity by drawing the line yourself. To draw a transformation, select the event-driven activity, and then select a handle on the activity and drag the handle. This action draws a line. This line is then connected to the target state, indicating transitions between states. As shown in the following illustration:
Drag the handle of the event-driven activity inside the diagram's state activity and drag it to the following state activity to get the result as shown in the following figure:
To access the event-driven view, double-click the event-driven activity. The designer that appears is similar to the sequential Workflow designer. At the top of the designer, the navigation bar displays the active hierarchy until the event-driven activity is displayed. You can navigate back to the Status view by clicking any element in the displayed hierarchy. If a transition from one state to another is drawn in the status view, and the event-driven view of the activity is displayed, a set state activity is added to the event-driven activity for you. If you change the properties of a set state activity, it is reflected in the status View.
[Two] state machine workflow Activity
The following table describes the key activities that are used in the state machine Workflow Designer.
Toolbox name |
activity |
description |
state |
stateactivity |
|
setstate |
setstatea Ctivity |
|
stateinitializationactivity |
|
statefinalizationactivity |
|
eventdriven |
eventd The rivenactivity |
|