WorkflowRuntime.GetLoadedWorkflows Método

Definición

Obtiene una colección que contiene todas las instancias de flujo de trabajo actualmente cargadas en la memoria.

public:
 System::Collections::ObjectModel::ReadOnlyCollection<System::Workflow::Runtime::WorkflowInstance ^> ^ GetLoadedWorkflows();
public System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.Runtime.WorkflowInstance> GetLoadedWorkflows ();
member this.GetLoadedWorkflows : unit -> System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.Runtime.WorkflowInstance>
Public Function GetLoadedWorkflows () As ReadOnlyCollection(Of WorkflowInstance)

Devoluciones

Un WorkflowInstance para cada instancia de flujo de trabajo actualmente cargada en la memoria.

Excepciones

Ejemplos

En el siguiente ejemplo de código se muestra cómo utilizar una colección de flujos de trabajo cargados de un objeto WorkflowRuntime.

// Create a new workflow runtime
WorkflowRuntime workflowRuntime = new WorkflowRuntime();
// Start the runtime
workflowRuntime.StartRuntime();
// Create a collection of workflow instances
ReadOnlyCollection<WorkflowInstance> workflows;
// Populate the collection of workflow instances
workflows = workflowRuntime.GetLoadedWorkflows();
' Create a new workflow runtime
Dim workflowRuntime As New WorkflowRuntime()
' Start the runtime
workflowRuntime.StartRuntime()
' Create a collection of workflow instances
Dim workflows As ReadOnlyCollection(Of WorkflowInstance)
' Populate the collection of workflow instances
workflows = workflowRuntime.GetLoadedWorkflows()

Comentarios

Tenga en cuenta que, a diferencia de GetWorkflow, este método no lanza ninguna InvalidOperationException si no se inicia el tiempo de ejecución.

Se aplica a