WorkflowRuntime.IsStarted Property

Definition

Gets a value that indicates whether the workflow run-time engine has been started.

C#
public bool IsStarted { get; }

Property Value

true if the workflow run-time engine has been started; otherwise, false. The default is false.

Examples

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

C#
// 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.");

Remarks

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

Huomautus

You cannot add core services to the workflow run-time 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.

Applies to

Tuote Versiot
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1