Szerkesztés

Megosztás a következőn keresztül:


WorkflowRuntime.IsStarted Property

Definition

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

public:
 property bool IsStarted { bool get(); };
public bool IsStarted { get; }
member this.IsStarted : bool
Public ReadOnly Property IsStarted As Boolean

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.

// 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.");
' Create a new workflow runtime
Dim workflowRuntime As New WorkflowRuntime()
' Start the runtime
workflowRuntime.StartRuntime()
' If the runtime is started, report to the console.
If workflowRuntime.IsStarted Then
    Console.WriteLine("Runtime is started.")
End If

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.

Note

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