StateInitializationActivity Class
Acts as a container to a group of activities that is executed when the StateActivity starts running. This class cannot be inherited.
Assembly: System.Workflow.Activities (in System.Workflow.Activities.dll)
System.Workflow.ComponentModel::DependencyObject
System.Workflow.ComponentModel::Activity
System.Workflow.ComponentModel::CompositeActivity
System.Workflow.Activities::SequenceActivity
System.Workflow.Activities::StateInitializationActivity
[ToolboxBitmapAttribute((StateInitializationActivity^::typeid), "Resources.StateInitializationActivity.png")] [ComVisibleAttribute(false)] [ObsoleteAttribute("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")] public ref class StateInitializationActivity sealed : SequenceActivity
| Name | Description | |
|---|---|---|
![]() | StateInitializationActivity() | Initializes a new instance of the StateInitializationActivity class. |
![]() | StateInitializationActivity(String^) | Initializes a new instance of the StateInitializationActivity class using the name of the activity. |
| Name | Description | |
|---|---|---|
![]() | Activities | Gets the object representing the collection, ActivityCollection, of all child activities.(Inherited from CompositeActivity.) |
![]() | CanModifyActivities | Gets or sets a value which controls whether the individual activities within Activities can be modified.(Inherited from CompositeActivity.) |
![]() | Description | |
![]() | DesignMode | Gets the value that indicates whether this instance is in design or run-time mode.(Inherited from DependencyObject.) |
![]() | Enabled | Gets or sets a value that indicates whether this instance is enabled for execution and validation.(Inherited from Activity.) |
![]() | EnabledActivities | Gets the read-only collection that represents the subset of Activities that are enabled. (Inherited from CompositeActivity.) |
![]() | ExecutionResult | Gets the ActivityExecutionResult of the last attempt to run this instance.(Inherited from Activity.) |
![]() | ExecutionStatus | Gets the current ActivityExecutionStatus of this instance.(Inherited from Activity.) |
![]() | IsDynamicActivity | Gets information about whether the activity is executing within the default ActivityExecutionContext of the workflow instance.(Inherited from Activity.) |
![]() | Name | Gets or sets the name of this instance. This name must conform to the variable naming convention of the programming language that is being used in the Workflow project.(Inherited from Activity.) |
![]() | Parent | Gets the CompositeActivity that contains this Activity.(Inherited from Activity.) |
![]() | QualifiedName | Gets the qualified name of the activity. Qualified activity names are always unique in a workflow instance.(Inherited from Activity.) |
![]() | Site | Gets or sets a reference to the Site component of the DependencyObject.(Inherited from DependencyObject.) |
![]() | UserData | Gets an IDictionary that associates custom data with this class instance.(Inherited from DependencyObject.) |
| Name | Description | |
|---|---|---|
![]() | Canceling | Occurs when the activity execution is canceled. (Inherited from Activity.) |
![]() | Closed | |
![]() | Compensating | |
![]() | Executing | |
![]() | Faulting | Occurs when an exception is raised during the running of the instance.(Inherited from Activity.) |
![]() | StatusChanged | Occurs when the ActivityExecutionStatus of a running Activity changes.(Inherited from Activity.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IComponent::Disposed | Represents the method that handles the Disposed event of a component.(Inherited from DependencyObject.) |
![]() ![]() | IActivityEventListener<ActivityExecutionStatusChangedEventArgs^>::OnEvent(Object^, ActivityExecutionStatusChangedEventArgs^) | Defines the processing procedure when the subscribed-to event occurs.(Inherited from SequenceActivity.) |
Note |
|---|
This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5. |
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.
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
System.Workflow.Activities Namespace
Using the StateInitialization Activity








