如何以编程方式终止作为工作流服务运行的工作流实例 [英] How to programmatically terminate a workflow instance running as a workflow service

查看:131
本文介绍了如何以编程方式终止作为工作流服务运行的工作流实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows工作流服务,并且希望通过Web服务请求以编程方式终止特定的工作流实例,而无需将其构建到工作流本身中.

I am using windows workflow service and would like to programmatically terminate a specific workflow instance via a web service request without building this into the workflow itself.

通过将其构建到工作流本身中,我的意思是拥有一个特定的Receive活动,该活动将负责终止该活动.

By building it into the workflow itself, I mean having a specific Receive activity which will be responsible for terminating the activity.

所以我在想类似的东西:

So I am imagining something like:

http://myhost/myworkflowservice/myworkflow.xamlx/terminate

这种功能是否存在?

谢谢, 埃里克

推荐答案

只需添加 Workflow Control Endpoint (工作流控制端点),该端点可以调用工作流服务的远程操作.通过 web.config 添加它:

Just add a Workflow Control Endpoint which allows one to call remote operations on workflow service. Add it through web.config:

<endpoint address="<endpoint_address>" binding="basicHttpBinding" kind="workflowControlEndpoint" />

然后,您可以使用 WorkflowControlClient 来调用控制消息(运行,取消,挂起等)到WorkflowControlEndpoint.

Then you can use WorkflowControlClient to call control messages (Run, Cancel, Suspend, etc.) to a WorkflowControlEndpoint.

这篇关于如何以编程方式终止作为工作流服务运行的工作流实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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