I need to stop the execution Is there any procedures for using terminate and suspend activity
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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();
回答2:
This sample at the microsoft website should help you with the suspend and terminate Activity
http://msdn.microsoft.com/en-us/library/ms742189.aspx