This documentation is archived and is not being maintained.

StateMachineWorkflowActivity.CompletedStateName Property

Gets or sets the end StateActivity of the workflow.

Namespace: System.Workflow.Activities
Assembly: System.Workflow.Activities (in system.workflow.activities.dll)

public string CompletedStateName { get; set; }
/** @property */
public String get_CompletedStateName ()

/** @property */
public void set_CompletedStateName (String value)

public function get CompletedStateName () : String

public function set CompletedStateName (value : String)

Not applicable.

Property Value

The end StateActivity of the workflow.

When a transition is made to the CompletedStateName, the workflow execution is completed. The CompletedStateName is not mandatory. This means that you can have a StateMachineWorkflowActivity that is not completed. This does not mean that the state machine workflow is always active in memory. The StateMachineWorkflowActivity might be unloaded as it waits for an event.

For more information about InitialStateName and CompletedStateName, see StateMachineWorkflowActivity.

The following code example shows how to set the value of the CompletedStateName property. This code example is part of the SimpleStateMachineWorkflow SDK sample from the StateMachineWorkflow.cs file. For more information, see Simple State Machine.

this.Activities.Add(this.StartState);
this.Activities.Add(this.state1);
this.Activities.Add(this.CompletedState);
this.CompletedStateName = "CompletedState";
this.DynamicUpdateCondition = null;
this.InitialStateName = "StartState";
this.Name = "StateMachineWorkflow";
this.CanModifyActivities = false;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: