Restarting automation when error occurs

Hello guys,

Is it possible to do the following? Let’s say my automation fully runs on “use browser” activity (for example I’m downloading some excel files from the website). Lets assume that there is an internet shortage and my automation cannot proceed to the next step. Is it possible to make it so that when any error is encountered the automation restarts and tries again?

Oh and I’d like to specify. NO tries the same step again but instead restarts all automation.

Hi @anon40731888
You can simply put a try catch block on your entire sequence, and inside the catch block, try closing and reopening all the apps, and put a retry as well.

Or instead you can use RE Framework, it is already configured in such a way that if you code your automation in defined manner it will handle any system exception and it will restart all the apps that you would be using in your workflow.
Please read the documentation: RE Framework Documentation

Thanks,
Aditya

What you need to be doing is error handling with Try/Catch etc. so that it stops gracefully when there is an error.

if you arent using REFramework you can do this:

  1. have a retry scope
  2. inside retry scope put try-catch
  3. in try block put use application logic (set open=always)

  1. in catch block call kill process and then call rethrow. the purpose of rethrow is to propagate error to retry scope in order to trigger the retry mechanism . This will make it so that if theres an error the robot will 1. kill browser 2. retry the automation
    image

Hello,

Sorry for a very late reply. What do you mean by “set open=always”?

There’s a property, refer the screenshot below:
image

Oh right it refers to the browser thank you.

I’m stuck on the process name, how do I know how to set it? this is my workflow:


question2

Do you have any ideas?

hi @anon40731888

You have to provide the processName in double quotes!

“chrome.exe” or “chrome”

It worked, thanks!

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