Partilhar via


WorkflowHostingEndpoint.OnResolveBookmark Método

Definição

Substitua para retornar um indicador a ser retomado na instância de fluxo de trabalho.

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[]

As entradas para a operação de serviço.

operationContext
OperationContext

O contexto de execução da operação de serviço que está sendo invocada.

responseContext
WorkflowHostingResponseContext

O objeto WorkflowHostingResponseContext que pode ser usado para enviar respostas de volta para a origem da mensagem para um contrato de solicitação/resposta.

value
Object

Um valor a ser passado de volta para a instância do fluxo de trabalho quando o indicador for retomado.

Retornos

Bookmark

Um indicador.

Exemplos

O exemplo a seguir mostra como implementar o OnResolveBookmark método.

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;
}

Aplica-se a