Break activity in an IF function

Hello everyone,

I have a question about the break activity.

lets say i have a set up such as the above.
Would the 2nd IF activity run even if the condition in the first activity was met and went through the Break activity, OR would the Break activity completely end the sequence at that point?

1 Like

you can specify both the condition in same if!
it’ll break the entire process!

if you are using it condition inside a loop it will break the entire loop once it matches the conditionc

cheers @dvn

Usually BREAK activity can be use only in FOR EACH or FOR EACH ROW activity

And make sure that this IF activity is used inside any of the above two mentioned activities
Only then we can
And of course as you said if the first IF condition gets satisfied then it will go to BREAK and then break the whole for each or for each row loop
It won’t go for the next activity to this IF condition

Cheers @dvn

1 Like


@Palaniyappan explained it very well.
I just want to add that if you really need to “break” inside a if activity, you can use the throw with a new Exception() inside. Put your if inside a try catch, and it will work very well :ok_hand:

Enjoy :slight_smile:

1 Like

will it behave like break ? , in my scenario i want to break the loop and move forward not to throw an exceprion and stop the process

Sounds like you should use the Break activity.

but its not working in do while and while loop , check this question i recently added