您如何打破序列活动并导致工作流结束? [英] How do you break out of a sequence activity and cause the workflow to end?

查看:115
本文介绍了您如何打破序列活动并导致工作流结束?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要实现以下伪代码逻辑:

1.获取配置
2.验证配置
3.如果验证不正确
-为工作流程变量设置错误
-为工作流程变量设置枚举值错误
-结束工作流程<-这是问题
4,工作流程的其余部分是否是

我的问题是我要使用什么活动来结束工作流程"?

如果没有活动可以执行此操作,那么我将使用什么活动序列来完成相同的逻辑?

我考虑过使用Cancellation作用域,但是我不知道如何从工作流本身中调用CancelHandler?

有什么想法吗?

预先谢谢您.

I have the following psuedocode logic that I would like to implement:

1. Get the configuration
2. Validate the configuration
3. If the validation is bad
      - Set a workflow variable with the errors
      - Set a workflow variable with the enum value error
      - End the workflow <- This is the problem
4. Do the rest of the workflow

My problem is what activity do I use to "End the workflow"?

If there is no activity to do this, what activity sequence would I use to accomplish the same logic?

I considered using a Cancellation scope, but I cannot figure out how to invoke the CancelHandler from within the workflow itself?

Any ideas?

Thank you in advance.

推荐答案

您好,

您可以在内部使用Flowchart活动添加流程图的活动.然后添加活动以进行验证.然后声明变量Isvalid,然后根据验证成功或失败将其值设置为True或False.添加FlowDecison活动.将其条件"属性设置为IsValid,并相应地更改工作流的执行路径.如果设置为false,则将工作流变量设置为错误,如果设置为true,则继续进行其余的工作流.

Hi,

You can use Flowchart activity inside the sequence for this purpose. Add the FlowChart activity.Then add activities to do validations.Then Declare a variable Isvalid and set its value to True or False based on the validations succeeded or failed.Then  add FlowDecison activity. Set its Condtion property to IsValid and change the execution path of your workflow accordingly. If its false set the workflow variables with errors and if it is true continue with the rest of the workflow.

suchi


这篇关于您如何打破序列活动并导致工作流结束?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆