Terminate and Suspend activity in Windows workflow Foundation

ぃ、小莉子 提交于 2019-12-04 19:48:38
gbanfill

It depends exactly what you want to do. There is a Terminate Activity will terminate the workflow instance that is running and has reached that activity. Once terminated, that workflow instance will be dead and will never be restartable.

Suspend is something you can call on a WorkflowInstance e.g.

WorkflowInstance instance = runtime.GetWorkflow(instanceId);
instance.Suspend("Paused for some good reason");

// do something here

instance.Resume();

This sample at the microsoft website should help you with the suspend and terminate Activity

http://msdn.microsoft.com/en-us/library/ms742189.aspx

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