State Workflow Activities
A finite state machine is a standard programming pattern in which behavior responds to events differently depending on a recorded state. Action occurs on state transitions that are triggered by events.
These activities are all specific to the State Machine workflow style and they only appear on the toolbox when you are using the State Machine workflow designer.
The State activity (shown in Figure 3.23) represents one state that the state machine can be in. When you create a new state machine workflow you always start with one state on the design surface.
Figure 3.23 The Workflow1 initial state.
Each state activity must either contain an EventDriven activity or a StateInitialization activity. The StateInitialization activity can have action activities dragged into it to execute on the change to the state.
The SetState activity (shown in Figure 3.24) is dragged into the view of a StateTransitionHandler to specify a new state to change to. It can also appear at the end of an EventDriven sequence.
Figure 3.24 A SetState activity.