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.
State Activity
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.
StateInitialization Activity
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.
SetState Activity
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.