Restarting the entire robot on error

Hi all
I have a Robot built which is going through a power BI dashboard and using dynamic selectors i am able to select multiple clients and export to pdf with the path\clientname\client.pdf
when it or if it fails i have powershell script which looks at the current CSV and also a checkpoint CSV which is being updated throughout the run appending client mames to it. on failure my ps script compares both files and updates the master with the changes so that my robot doesnt got back to the start again (roughly 250 clients / each run takes about a minute or so)
what i would like to know whether i can get the Robot to on failure, simply restart itself and the logic in my script will do the rest, its the restarting bit i am not sure whether its achievable?

Again , many thanks for your help and time, this place is really good in terms of expertise and getting answers. Hopefully i can get one to this?! :slight_smile:

Best regards
PS if there is another way then that would be great or if i am missing something?

Phil

Hi @philwaller

One thing you can try is using start job activity in your catch block to start the job

Cheers

Hi Anil

Thanks , but what would be in the catch?

how do i actually do the restarting? what am i pointing at in terms of action/activity?

Regards

Phil

Hi @philwaller

Use a try catch…and when the bot actually fails in the catch block you will use start job activity which will start a new job as needed and this job will finish…

Or if you need same job to continue from first then create a loop and run it again

The restart will happen from the first activity always…if you need to start from some specific activity when failed or from the activity which failed then use a global exception handler which can be used for the exact same purpose

cheers

Hi Anil

Start job is for orchestrator jobs? is that correct , i take it from this, that i would need to publish to orchestrator my task/job?

i am using modern ui and have

folderpath
processname

what goes in those two lcoations?

Folder path = the location of my xml ?
processname = ? is this the process name assigned to orchestrator or something like that - apologies, pretty new to this !

Thanks again!

Phil

HI @philwaller

Yes I am referring to same

Folder path - is the orchestrator folder path if you are usign multiple folders if not you can leave it blank…

Process name - is the process name in your orchestrator…SO once you upload your package you have to create a process out of it and that is the name that you need to give here

https://docs.uipath.com/activities/docs/start-job

cheers

Thanks Anil !

I will take a look - many many thanks again, Top stuff , the help here is excellent!

Regards
Phil

1 Like

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