WorkflowHostingEndpoint.OnResolveBookmark 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
覆寫以傳回要在工作流程執行個體上繼續的書籤。
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
參數
- inputs
- Object[]
服務作業的輸入。
- operationContext
- OperationContext
叫用之服務作業的執行內容。
- responseContext
- WorkflowHostingResponseContext
WorkflowHostingResponseContext 物件,這個物件可用於將回覆傳回要求/回覆合約的訊息來源。
- value
- Object
當書簽繼續時,要傳回至工作流程實例的值。
傳回
書籤。
範例
下列範例將示範如何實作 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;
}