UiPATH Exit sequence or flowchart activity

I am new to UiPath. Based on condition I want to totally exit a sequence or a flowchart.
Is there such a feature in UiPath like in any programing languages?

Hi @endy,

For any loop structures, you can use Break activity.

For flowcharts, you can place a flow decision with certain decision, and when its true, dont include any sequence/activities in there, so upon passing that condition, there will be nothing further to execute.

For sequence/workflow, you can use ‘Terminate workflow activity’ but it will throw exception while terminate… so wrap your sequence in try catch block, so when exception is thrown during termination of workflow, it is caught gracefully, exits from workflow and continues with further execution. Alternatively, you can also use if-else structure to define sequence in a way that it doesnt execute anything in else block but everything in if block.

Hope this helps.


1 Like


As you said based on the condition you need to exit a sequence or flowchart

That you can handle in IF condition which other programming languages do

Place your condition in IF condition there are two options you will get

Condition - True - What you want to do those activities you can place in Then Block
Condition - False - You can leave it as blank which will skip to next activities, IF that is the end of the flow/sequence then it will exit

Hope this may help you


Thanks. Got it.

Hi @endy,

Now that your query has been resolved, I would suggest to mark solution so this topic can be closed and others are also able to benefit from this.


1 Like

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