Break function in RPA Express

loops
#1

Good day

Is it possible to create a type of break function in RPA express to stop my while loop etc

#2

No, there is currently no such option. Have you tried using if-else action or another loop inside your while loop (repeat, for example) to stop the execution?

#3

the repeat function won;t work cause I don’t know how long the while must run, it looks for an image to turn the false to true

#4

@gerhardus_meyer
You can try something like this:

counter=0
status=false //condition variable for loop
while(status=false)
{
if(counter<10) then
call function();
else
status=true;
}

I hope it helps you resolve your issue.

1 Like
#5

Thank you, I have build something similar but I feel a normal break function would have been easier…

#6

For anyone having this problem, the closest workaround I could found is :

  • Wrap the code you want to be able to break from in a Exception Handling
  • To break, use a custom script where you throw an exception throw new Exception(“Custom break”)
    The only drawback of this method is that if there is any RPA error in the block (like an image not found), you will not be notified (you have to look at which step have been executed to see if the process ran correctly)
2 Likes