¿Le resultó útil esta página?
Sus comentarios sobre este contenido son muy importantes. Háganos saber su opinión.
¿Tiene comentarios adicionales?
Caracteres restantes: 1500
GetWorkflow (Método)

WorkflowRuntime.GetWorkflow (Método)

Retrieves the workflow instance that has the specified Guid.

Espacio de nombres: System.Workflow.Runtime
Ensamblado: System.Workflow.Runtime (en system.workflow.runtime.dll)

public WorkflowInstance GetWorkflow (
	Guid instanceId
)
public WorkflowInstance GetWorkflow (
	Guid instanceId
)
public function GetWorkflow (
	instanceId : Guid
) : WorkflowInstance
No aplicable.

Parámetros

instanceId

The Guid of a workflow instance.

Valor devuelto

The WorkflowInstance that has the specified Guid.

Tipo de excepciónCondición

InvalidOperationException

The WorkflowRuntime is not started

If instanceId specifies a workflow instance that is not currently in memory, the workflow instance is loaded into memory and scheduled for execution. For example, after a workflow instance has been aborted, you can call GetWorkflow to load the workflow instance back into memory. In this case, the last persisted state of the workflow instance will be loaded into memory by the persistence service.

The following code example demonstrates a ReloadWorkflow method that calls the GetWorkflow method. The ReloadWorkflow method is part of a larger class that has a Runtime property to access all of the methods, properties, and events of the WorkflowRuntime class. The GetWorkflow method is used to access the specified workflow instance which is then loaded using the WorkflowInstance.Load method.

This code example is part of the Custom Persistence Service SDK sample from the Program.cs file. For more information, see Custom Persistence Service.

private void ReloadWorkflow(object id)
{
    // Reload the workflow so that it will continue processing
    this.Runtime.GetWorkflow((Guid)id).Load();
}

Windows 98, Windows 2000 Service Pack 4, Windows CE, Windows Millennium, Windows Mobile para Pocket PC, Windows Mobile para Smartphone, Windows Server 2003, Windows XP Media Center, Windows XP Professional x64, Windows XP SP2, Windows XP Starter

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0

Adiciones de comunidad

AGREGAR
Mostrar:
© 2015 Microsoft