How to use Retry scope and Try Catch activities together correctly

Hi,

I need to build RPA process which tries to download data from a webpage. That webpage sometimes takes a long time load data. Therefore, I am planning to use Retry scope and Try Catch activities together for this process.

The idea is that

  • First, robot will search data from the webpage for a specific date inside the retry scope.
  • Because that webpage sometimes takes long time to load data, it can cause time out exception.
  • Whenever there is an exception, retry scope will retry the process. I will set max number of retry to be 3.
  • The process still throw an exception even after 3 retries, I will use try catch activities to catch the exception and report the user. In this case, should I use rethrow the exception inside the catch or use throw the exception inside the catch?

What is the correct way of using retry and try catch activities together for this application?

Thanks.

@peter.tun

if you want to throw or rethrow then there is no use of having try catch as well as you can just leave like that and when there is error an exception is anyways thrown

cheers

I want to catch the exception message and send email to user about reason of failing.

Thanks.

@peter.tun

generally sending on exception is done at a consolidated level…if you want to send exception mail at every step then you can use try catch and in catch send the mail and jsut rethrow if you want the process to terminate or have the exception persisted else dont do anythign after mail so that exception is supress

generally if you talk about ref…the exception is thrown and is caught by try catch in the outer xamls catch activities to handle all togehter rather than having separate for each

cheers

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