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