Windows Workflow 4 从内部对象中止?
我有一个在对象上调用 InvokeMethod 的工作流程(简单序列)。我想根据对象内的代码中止整个工作流程。
这有点像 http://msdn.microsoft.com/en-us/site/ dd560894 但这是自上而下中止的,我想从自下而上停止整个工作流程。怎么做呢?
谢谢。
I have a workflow (simple sequence) that calls InvokeMethod on an object. I would like to abort the entire workflow based on code within the object.
This is kind of like http://msdn.microsoft.com/en-us/site/dd560894 but that is aborting from top-down, and I want to just halt the whole workflow from bottom-up. How to do that?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过调用 NativeActivityContext.Abort 从 NativeActivity 执行此操作。你如何调用InvokeMethod?
You can do this from a NativeActivity by calling NativeActivityContext.Abort. How are you calling the InvokeMethod?
您真的需要中止工作流程吗?还是工作流程直接结束就可以了?如果您对结束感到满意,那么我认为您有两种选择,具体取决于工作流程的复杂性:
Do you really need to abort the workflow or is it OK if the workflow just ends? If you are happy with it ending, then I think you have two options depending on the complexity of the workflow: