Partager via


WorkflowHostingEndpoint.OnResolveBookmark Méthode

Définition

Substituez pour retourner un signet à reprendre sur l'instance de flux de travail.

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

Paramètres

inputs
Object[]

Entrées à l'opération de service.

operationContext
OperationContext

Contexte d'exécution de l'opération de service appelée.

responseContext
WorkflowHostingResponseContext

Objet WorkflowHostingResponseContext qui peut être utilisé pour envoyer des réponses à la source de message pour un contrat de demande/réponse.

value
Object

Valeur à transmettre à l’instance de workflow lorsque le signet est repris.

Retours

Bookmark

Signet.

Exemples

L'exemple de code suivant illustre l'implémentation de la méthode 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;
}

S’applique à