WF 4, WCF, cancel running workflow

↘锁芯ラ 提交于 2019-12-22 11:28:30

问题


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.


回答1:


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




回答2:


Another option is shown in the WF4 Batch Job example



来源:https://stackoverflow.com/questions/5456761/wf-4-wcf-cancel-running-workflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!