How can exceptions that are caught be passed to orchestrator?

Hi,

I am using Try-Catch for some processes. Now, the process fails in between the execution due to some internal error of the application. Is there a way I can send this notification of catch to orchestrator so that I can re-run the process again until it is a success?

Regards,
Jyothi

hi @Jyothi31 , you can use the rethrow activty to throw the error again that you caught with the try-catch. Use the auto-retry feature of queue’s to try again!

Can you please elaborate it further or give me brief detailed steps?

Thanks,
Jyothi

Hi @Jyothi31

For the system exception
While declaring queue you can set the property of retry

With this robot will automatically attempt your transaction again

If you do not want to declare at queue level

In the re framework config file you can assign the value to max no retries in settings sheet

Just make sure your exception is catched

Confirm the try catch activity levels and it will do the needful

That’s the perk of REFRAMEWORK :raised_hands:t2:

I created a config file and set the max of retries=5. The exceptions are caught in the catch block where I have used “system.execption”
Can you please elaborate on re-framework? If we use the reframework is there no need of queues?

@Jyothi31 No no u don’t have to create config file

Re framework is a UiPath code template which is having queue based implementation and it has covered this business exception scenarios and retries for system exception entries

You can follow the videos of link below to understand in detail for reframework

This is a specific video but in this channel there is detail playlist

It will be helpful

Hi @Jyothi31
By using REFramework you have error handling and retry mechanisms with or without using Orchestrator queues.

I strongly recommend you to follow all related training courses as this is a standard that most developers use for enterprise grade automations

Hope it helps!

you have many options to do that
1- inside the try block surround the entire seq or workflow you want to re-execute if fails with RetryScop and do a condition that can check workflow is done if false try the entire workflow again, you need to specify how many times you want the robot to retry after exception and time interval between each try.

2- use reframwork that has a retry mechanism which retry the item once system exception occurred for a predefined numbers of retry.

might be first option is better if you want to do that faster without lot of changes