FinalState Activity Designer

The FinalState designer is used to create a State that terminates a state machine instance.

Note

State machine functionality in Windows Workflow Foundation (WF) was introduced as part of the Update 4.0.1 for Microsoft .NET Framework 4 (KB2478063). To create state machine workflow applications in Visual Studio 2010, the Update 4.0.1 for Microsoft .NET Framework 4 – Design-time Package for Visual Studio 2010 SP1 (KB2495593) is required. For more information and instructions on how to download and configure these updates, see Update 4.0.1 for Microsoft .NET Framework 4 Features.

Using the FinalState Activity Designer

The FinalState designer is used to create a State that is preconfigured as a terminating state in a state machine. A State that is created using the FinalState activity designer has its IsFinal property set to true, has no Exit activity and no transitions originating from it. To use the FinalState activity designer to add a State activity that is preconfigured as a terminating state in a state machine, drag the FinalState activity designer from the State Machine section of the Toolbox and drop it onto the workflow designer. The FinalState activity designer can be dropped onto a StateMachine and transitions added later; or a transition can be created as the FinalState activity designer is dropped. For more information on creating transitions, see Transition Activity Designer.

State Activity Properties in the Workflow Designer

The following table shows the properties that can be set using the FinalState 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.

Property Name Required Usage

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. This value can be set by dragging an activity from the Toolbox and dropping it onto the Entry section of the state.

Note

If the state machine activities do not appear in the Toolbox, ensure that the Target framework is set to one of the .NET Framework 4 Platform Update 1 profiles in the project properties.

Project Properties

See Also

Concepts

StateMachine Activity Designer
State Activity Designer
Transition Activity Designer