WF 4、WCF、取消运行工作流 [英] WF 4, WCF, cancel running workflow

查看:34
本文介绍了WF 4、WCF、取消运行工作流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前有一个作为服务端点公开的简单工作流.该服务与工作流实例 ID 相关联,一切都按预期工作(2 个服务调用可用 ReceiveBegin、Execute).

Currently have a simple workflow exposed as a service endpoint. The service correlates on the workflow instance id and everything works as expected (2 service calls available ReceiveBegin, Execute).

我的问题是我希望用户能够通过在工作流上调用另一个 Receive 来取消工作流的长时间运行部分.已经查看了 WorkflowApplication.Cancel,但是当我将它作为 WCF 服务运行时,它似乎不可用.

My problem is that I would like the user to be able to cancel the long running part of the workflow by calling another Receive on the workflow. Have had a look at the WorkflowApplication.Cancel but as I am running this as a WCF service it doesn't seem to be available.

这方面的文档似乎有点少,大多数 HOL 和示例都侧重于托管工作流的控制台应用程序.

Documentation seems a bit light on this area and most HOL and examples focus on console apps hosting the workflow.

推荐答案

通过工作流服务,工作流控制端点WorkflowControlClient 将允许您取消工作流实例.

With workflow services the Workflow Control Endpoint and WorkflowControlClient will allow you to cancel workflow instances.

这篇关于WF 4、WCF、取消运行工作流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆