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?
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!
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
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