Share via


Using the StateInitializationActivity Activity

The StateInitializationActivity activity is used in a StateActivity activity as a container for child activities that are executed when the state is transitioned to. A StateActivity activity can have at most one StateInitializationActivity activity. Unlike an EventDrivenActivity activity, which can also be a child of a StateActivity activity, the StateInitializationActivity activity does not have to respond to events. It is always run when entering a StateActivity activity.

For more information, see the StateInitializationActivity class in the System.Workflow.Activities namespace in the Windows Workflow Foundation Class Library reference.

For a code sample that demonstrates how to use the StateInitializationActivity activity, see Simple State Machine.

See Also

Reference

StateInitializationActivity
StateFinalizationActivity
SetStateActivity
StateActivity

Concepts

State Machine Workflows

Other Resources

Simple State Machine Sample
Windows Workflow Foundation Activities