Exception logging without stopping the robot


I have one single workflow (Workflow 01) and a main workflow that calls Workflow 01. The main workflow has a try-catch block and in the catch I have created a data table to write to excel.

I need to write exceptions to the excel without stopping the robot.

How can I achieve this ?



Sounds like you have the right idea with Try/Catch. What you need is to loop back to that part again. You can accomplish this in a few different ways.

— Use a State Machine model where you can create a path that re-enters the state, which contains the Try/Catch. In the path, you can assign a retry counter, and create another path to an exit state that occurs when the retry counter is >= max retries. Possibly look up the ReFramework on an example of how to structure the State Machine.

— Place your Try/Catch inside a Flowchart where you can draw your arrow back around so it can re-enter the Try/Catch again. You will also need to assign a retry counter in the same way you would use it in the State Machine I mentioned above.

— Surround your Try/Catch with a Retry Scope, which retries until a condition activity (like Is True activity) is true or it has reached the retry amount. The condition used could be: SystemError is Nothing, and you would initialize it as Nothing and assign it to exception inside the catch.

I hope these ideas help.