Compartir a través de


WorkflowHostingEndpoint.OnResolveBookmark Método

Definición

Invalide este método para devolver un marcador que se va a reanudar en la instancia de flujo de trabajo.

protected public:
 virtual System::Activities::Bookmark ^ OnResolveBookmark(cli::array <System::Object ^> ^ inputs, System::ServiceModel::OperationContext ^ operationContext, System::ServiceModel::Activities::WorkflowHostingResponseContext ^ responseContext, [Runtime::InteropServices::Out] System::Object ^ % value);
protected internal virtual System.Activities.Bookmark OnResolveBookmark (object[] inputs, System.ServiceModel.OperationContext operationContext, System.ServiceModel.Activities.WorkflowHostingResponseContext responseContext, out object value);
abstract member OnResolveBookmark : obj[] * System.ServiceModel.OperationContext * System.ServiceModel.Activities.WorkflowHostingResponseContext * obj -> System.Activities.Bookmark
override this.OnResolveBookmark : obj[] * System.ServiceModel.OperationContext * System.ServiceModel.Activities.WorkflowHostingResponseContext * obj -> System.Activities.Bookmark
Protected Friend Overridable Function OnResolveBookmark (inputs As Object(), operationContext As OperationContext, responseContext As WorkflowHostingResponseContext, ByRef value As Object) As Bookmark

Parámetros

inputs
Object[]

Las entradas para la operación de servicio.

operationContext
OperationContext

El contexto de ejecución de la operación de servicio que se va a invocar.

responseContext
WorkflowHostingResponseContext

El objeto WorkflowHostingResponseContext que se puede usar para enviar las respuestas al origen del mensaje para un contrato de solicitud-respuesta.

value
Object

Valor que se va a devolver a la instancia de flujo de trabajo cuando se reanuda el marcador.

Devoluciones

Bookmark

Marcador.

Ejemplos

En el siguiente ejemplo se muestra cómo implementar el método OnResolveBookmark.

protected override Bookmark OnResolveBookmark(object[] inputs, OperationContext operationContext, WorkflowHostingResponseContext responseContext, out object value)
{
    Bookmark bookmark = null;
    value = null;
    if (operationContext.IncomingMessageHeaders.Action.EndsWith("ResumeBookmark"))
    {
        //bookmark name supplied by client as input to IWorkflowCreation.ResumeBookmark
        bookmark = new Bookmark((string)inputs[1]);
        //value supplied by client as argument to IWorkflowCreation.ResumezBookmark
        value = (string) inputs[2];
    }
    else
    {
        throw new NotImplementedException(operationContext.IncomingMessageHeaders.Action);
    }
    return bookmark;
}

Se aplica a