cancel
Showing results for 
Search instead for 
Did you mean: 

How can I loop a Bot from Failure event?

wvillam
Explorer
0 Kudos

Hi,

I need to re-try an execution in case it fails using Api Triggers.

I have a Call Web Service in the bot using Desktop Studio.

The idea is to have the entire bot ready for an execution. I upload it to the Factory. Once there I create an Api Trigger for the bot. But in case the entire execution fails, it needs to call the Api Trigger again x times to try again the execution.

vishal
Contributor
0 Kudos

Hi Wilson

As per my understanding these are the only options available and I suggest you explore them in detail. Additionally can look at retriggering bot from catch block based on use case

Regards

Vishal Rathi

Accepted Solutions (1)

Accepted Solutions (1)

vishal
Contributor
0 Kudos

Hi Wilson,

Based on inputs in my earlier comments - here is a design template - to utilize Try Catch loop to toggle between two sub-automations any number of times until failure continues. Check screenshots..

You first start your bot execution primarily from “MainAutomation”

MainAutomation triggers the sub-automation “Automation01” (Check SCREENSHOT A)

  • Automation01 will execute normally with all your steps for API trigger etc, only if there is a failure, the Catch block will come into effect which in turn triggers sub-automation Automation02 (Check SCREENSHOT B)

  • Automation02 will consist of same steps as that of Automation01 (Check SCREENSHOT C)

Note: Make sure you select “Can only be started from another automation” when creating Automation01 & Automation02 (Check SCREENSHOT D)

(Click on Attachment links below to enlarge them for clarity)

You might need to tweak and test this based on your need. All the best !

Regards,

Vishal Rathi

Answers (1)

Answers (1)

vishal
Contributor
0 Kudos

Hi Wilson,

Below options in combination should help

Regards,

Vishal Rathi

wvillam
Explorer
0 Kudos

Thaks for answer me. But the idea is to loop the entire execution in case it fail and not to control the errors inside the workflow. I'll be more specific in my description.
I work using Desktop Studio and once I finish the bot, it will be exported in Factory. The bot will be executed by an Api Trigger and if that execution fails, I needs to be capable to call the Api Trigger again x times to try again.