WF 4、WCF、取消正在运行的工作流
目前有一个简单的工作流程作为服务端点公开。该服务与工作流实例 ID 相关联,一切都按预期工作(2 个服务调用可用 ReceiveBegin、Execute)。
我的问题是,我希望用户能够通过调用工作流上的另一个接收来取消工作流的长时间运行部分。已查看 WorkflowApplication.Cancel
但由于我将其作为 WCF 服务运行,因此它似乎不可用。
文档似乎对这个领域有点了解,大多数 HOL 和示例都集中在托管工作流程的控制台应用程序上。
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).
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.
Documentation seems a bit light on this area and most HOL and examples focus on console apps hosting the workflow.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于工作流服务,工作流控制端点和WorkflowControlClient 将允许您取消工作流实例。
With workflow services the Workflow Control Endpoint and WorkflowControlClient will allow you to cancel workflow instances.
WF4 批处理作业示例中显示了另一个选项
Another option is shown in the WF4 Batch Job example