How to stop workflow after certain condition

Hi,

I have created workflow where there are three try blocks and multiple conditions in each block .In first try block sequence there is one condition where , if that condition satisfies then i dont want to go further for next 2 and 3 blocks.for that i have created variable and gave value as false for that particular condition and while starting of 2 and 3 block i have started as if variale = true.
By doing this workflow is not going to 2 nd block but it is going to 3 rd block thats why i am confuse after giving condition also it is going to 3 rd.
So, how can i stop this workflow in in 1 st block?
variable is global variable and those all block in one for each loop.
1

Hi @Mathkar_kunal

You can try with switch activitiy with each cases each try catch blocks

And use global varaible as Expression in switch statement.

Hope you got the logic

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

Not understood can you explain little bit more.
Means exactly where should i put switch case and use variable?

Let’s say u had a global varaible which decides to go to which block

Consider that varaible name as var_1 which is int32

Put that varaible in expression section of switch activitiy

Now consider three cases

Case 1 : when the var_1= 1, it should go to block 1

So.in first case put case value as 1 and corresponding action ( try catch block 1 ) there

Similarly u can do for other cases too

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

Hi,

My variable(continuer) is generic and contains boolean value.
there is one if in first block which i have put in default where if condition satisfies then i have put continuer variable true else i have put false.
what should i write in case 1 ?
1

Hi @Mathkar_kunal

Sorry for delayed response
Check this workflow
switch case.xaml (6.4 KB)

I had added annotations to it make u understand in simple way

Mark it as solution if it resolves your query

Regards
Nived N
Happy Automation

1 Like

Thanks for the help i put boolean values in case.Worked for me.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.