本文介绍了在 Windows 工作流基础中终止和暂停活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要停止执行 是否有使用终止和暂停活动的程序

I need to stop the execution Is there any procedures for using terminate and suspend activity

推荐答案

这完全取决于您想要做什么.有一个 Terminate Activity 将终止正在运行并已到达该活动的工作流实例.一旦终止,该工作流实例将失效并且永远无法重新启动.

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 是您可以在 WorkflowInstance 上调用的东西,例如

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();

这篇关于在 Windows 工作流基础中终止和暂停活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 19:26