如何以编程方式终止作为工作流服务运行的工作流实例

编程入门 行业动态 更新时间:2024-10-28 04:18:37
本文介绍了如何以编程方式终止作为工作流服务运行的工作流实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用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:

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.

更多推荐

如何以编程方式终止作为工作流服务运行的工作流实例

本文发布于:2023-11-24 09:25:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624656.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作流   实例   方式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!