Export (0) Print
Expand All

WorkflowRuntime.IsStarted Property

Gets a value that indicates whether the workflow runtime engine has been started.

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

public bool IsStarted { get; }

Property Value

Type: System.Boolean
true if the workflow runtime engine has been started; otherwise, false. The default is false.

IsStarted indicates that the workflow runtime engine services are running. IsStarted is false until the host calls StartRuntime. It remains true until the host calls StopRuntime.

NoteNote:

You cannot add core services to the workflow runtime engine while it is running. Core services are services that derive from the WorkflowSchedulerService class, the DefaultWorkflowCommitWorkBatchService class, the WorkflowPersistenceService class, and the TrackingService class.

The following example demonstrates accessing the IsStarted property of a WorkflowRuntime object. In this example, if the runtime is started, a message is printed to the console.

// Create a new workflow runtime
WorkflowRuntime workflowRuntime = new WorkflowRuntime();
// Start the runtime
workflowRuntime.StartRuntime();
// If the runtime is started, report to the console. 
if (workflowRuntime.IsStarted)
    Console.WriteLine("Runtime is started.");

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

Community Additions

ADD
Show:
© 2014 Microsoft