WorkflowRuntime.IsStarted Propriedade
Definição
Obtém um valor que indica se o mecanismo de tempo de execução de fluxo de trabalho foi iniciado.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
Valor da propriedade
true Se o mecanismo de tempo de execução do fluxo de trabalho foi iniciado; caso contrário, false .true if the workflow run-time engine has been started; otherwise, false. O padrão é false.The default is false.
Exemplos
O exemplo a seguir demonstra como acessar a IsStarted propriedade de um WorkflowRuntime objeto.The following example demonstrates how to access the IsStarted property of a WorkflowRuntime object. Neste exemplo, se o tempo de execução for iniciado, uma mensagem será impressa no console.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
Comentários
IsStarted indica que os serviços do mecanismo de tempo de execução do fluxo de trabalho estão em execução.IsStarted indicates that the workflow run-time engine services are running. IsStarted é false até que o host chame StartRuntime .IsStarted is false until the host calls StartRuntime. Ele permanece true até que o host chame StopRuntime .It remains true until the host calls StopRuntime.
Observação
Você não pode adicionar serviços principais ao mecanismo de tempo de execução do fluxo de trabalho enquanto ele está em execução.You cannot add core services to the workflow run-time engine while it is running. Os serviços principais são serviços que derivam da WorkflowSchedulerService classe, da classe DefaultWorkflowCommitWorkBatchService , da classe WorkflowPersistenceService e da TrackingService classe.Core services are services that derive from the WorkflowSchedulerService class, the DefaultWorkflowCommitWorkBatchService class, the WorkflowPersistenceService class, and the TrackingService class.