I am working on a long linear automation.where i am getting irrelevent system errors while running the robot and robot stop working.but these errors not occurs when i restart the robot.
for example i got this error in morning" read range: could not read range a:iv." but it gone when i restart the robot.
Is there any way where i can retry that activity where i get system error?
some of you will suggest try and catch but how should i handle it in catch and retry this perticular activity again ? please help.
→ If it is failing for first time, then you can use try catch activity, in the try block insert the read range activity
→ Create a catch system.exception in catch block insert the retry scope activity and by default the retries are 3 or you can change based on your conditions in properties.
→ Inside action block of retry scope insert the read range workbook activity
The above workflow will execute the read range activity in try block first if it throws any exception bot will go to catch block and execute the read range activity if it fails once more then it will retry scope retries the read range activity based on provided retries.
Use Retry Scope Activity
Here you get the properties with No. of Retries and Retry Interval time. By Default: Number Of Retries is 3, so it will retry 3 times. And RetryInterval is 5 seconds.
Keep the activity (i.e. Read Range) inside Retry scope. By default it will retry the activity for three times if there is any error. You can change the retry number in Properties section.