StateInitializationActivity Class

Acts as a container to a group of activities that is executed when the StateActivity starts running. This class cannot be inherited.

Namespace:  System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)

[ToolboxBitmapAttribute(typeof(StateInitializationActivity), "Resources.StateInitializationActivity.png")]
[ComVisibleAttribute(false)]
public sealed class StateInitializationActivity : SequenceActivity

The StateInitializationActivity acts as a SequenceActivity to all activities it contains.

SetStateActivity classes may be included in the StateInitializationActivity.

If a StateInitializationActivity exists in a StateActivity, the StateInitializationActivity is the first activity that gets executed when the StateActivity starts executing. In some ways the StateInitializationActivity is like an OnEnterState handler.

The StateInitializationActivity is not a mandatory activity in the StateActivity.

The StateInitializationActivity is a CompositeActivity, which means the StateInitializationActivity can contain other activities. The StateInitializationActivity cannot contain any activity that implements the IEventActivity interface, which includes all HandleExternalEventActivity activities and the DelayActivity activity.

A StateInitializationActivity is executed in the StateActivity, a non-blocking manner that makes the StateActivity ready to receive events. The StateInitializationActivity can contain a SetStateActivity activity, so that it can model a state machine where transitions occur from state to state without receiving any event. In that sense the state machine behaves like a sequential workflow.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft