Restart a sequence of activities if there is an error

Problem:
The robot clicks a wrong item in 20% of the cases and then the sequence fails.

Idea:
The robot could retry the sequence if it fails.

Any advice how I could do that in a simple way?
If retry scope is suitable, what would then be the condition?
Thanks

Hi @Jizh

A question before suggesting anything.
if your process fails at the step that you’ve described, does it find anyproblem starting the sequence from the beginning?

@reda
It is on a webpage and for a reason I havent found yet it sometimes clicks the home button instead of an element that I have specified. So yes, it could start from the beginning (start page of website).

Ok, can’t you make any workaround to improve the selector(more reliable selector, click relative to an anchor or even click image …) because this is going to be way more easier and will optimize time compared to running the sequence all again in 20% of the cases that can fall into the same problem all over again.

1 Like

Thanks, that surely is the better way. I will try to get behind it. Probably the website is sometimes loaded in a different speed. However, could you give me a hint how I could do the retry of a sequence in case of error (also for other situations)?

So if you’re working with REFramework there is already a retry mechanism that you only configure from the Excel sheet in the data folder by giving the number of retries desired.

But if you’re not working with it you need to have a flowchart structure to be able to go back from block to another, then for the activity that you want to retry you place it inside a try catch so the exception can’t stop your workflow, the try will contain your sequence and then you can place an assign activity in the exception or finally blocks to increment a variable that will count the number of retries. after the try catch activity you place a Flow Decision activity to decide whether you reached the max retries so go to next item otherwise if it’s not reached go back to try and catch.

Well the second one is going to be tricky to implement so for these cases it’s always a good practice to use The ReFramework since it Has this Retry mechanism by default.

1 Like

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