This topic has not yet been rated - Rate this topic

StateMachineWorkflowInstance Class

Represents a class that manages the current instance of a StateMachineWorkflowActivity. This class cannot be inherited.

System.Object
  System.Workflow.Activities.StateMachineWorkflowInstance

Namespace:  System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)
public sealed class StateMachineWorkflowInstance

The StateMachineWorkflowInstance type exposes the following members.

  Name Description
Public method StateMachineWorkflowInstance Initializes a new instance of the StateMachineWorkflowInstance class.
Top
  Name Description
Public property CurrentState Gets the currently executing StateActivity.
Public property CurrentStateName Gets the name of the current StateActivity.
Public property InstanceId Gets the Guid that indicates the current instance of the StateMachineWorkflowActivity.
Public property PossibleStateTransitions Gets a collection of state transitions that the current StateActivity can make.
Public property StateHistory Gets a collection of state activities that the state machine workflow instance has transitioned through.
Public property StateMachineWorkflow Gets the latest definition of the StateMachineWorkflowActivity.
Public property States Gets a list of StateActivity classes in the StateMachineWorkflow.
Public property WorkflowInstance Gets the current WorkflowInstance.
Top
  Name Description
Public method EnqueueItem(IComparable, Object) Posts a message to the StateMachineWorkflowInstance.
Public method EnqueueItem(IComparable, Object, IPendingWork, Object) Posts a message to the StateMachineWorkflowInstance.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetState(StateActivity) Provides a transition to a specified StateActivity.
Public method SetState(String) Provides a transition to a specified StateActivity using the name of the StateActivity.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

This class also provides the query interface over the current instance of the StateMachineWorkflowActivity. By using an instance of this class, you can make various queries on the StateMachineWorkflowInstance.

Typical queries that can be made are as follows:

  • Current state of the state machine.

  • Possible transitions from the current state.

  • History of transitions for the state machine instance.

  • Enumeration of all the states in the state machine.

.NET Framework

Supported in: 4, 3.5, 3.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ