State Activity Designer
A State represents a state in which a state machine can be in.
To add a State to a workflow, drag the State activity designer from the State Machine section of the Toolbox and drop it on to a StateMachine activity on the Windows Workflow Designer surface. A State activity can be dropped onto a StateMachine and transitions added later; or a transition can be created as the State activity is dropped. To add a State activity and create a transition in one step, drag a State activity from the State Machine section of the Toolbox and hover it over another state in the workflow designer. When the dragged State is over another State, four triangles will appear around the other State. If the State is dropped onto one of the four triangles, it is added to the state machine and a transition is created from the source State to the dropped destination State. For more information, see Transition.
The following table shows the State properties that can be set using the workflow designer and describes how they are used in the designer. Some of these properties can be edited in the property grid and some can be edited on the designer surface.
|DisplayName||False||Specifies the friendly name of the State activity designer in the header. The default value is State. The value can be edited in the property grid or directly on the header of the activity designer. The DisplayName is used in the breadcrumb navigation that is displayed at the top of the workflow designer.|
Although the DisplayName is not strictly required, it is a best practice to use one.
|Entry||False||Specifies the action that occurs when this state is transitioned to. When the State activity is expanded, this value can be set by dragging an activity from the Toolbox and dropping it onto the Entry section of the state.|
|Exit||False||Specifies the action that occurs when this state is transitioned away from. When the State activity is expanded, this value can be set by dragging an activity from the Toolbox and dropping it onto the Exit section of the state.|
|Transitions||False||Lists the possible transitions that originate from the State. Each item in the list has a link to the associated Transition and the destination State. Clicking the link will switch the designer to an expanded view of the Transition or State.|