Transaction Timeout / Time Limit in Re Framework

I’m using the Re Framework with a Queue.

Each transaction should take no more than 360 seconds, and if it is still processing a transaction after 360 seconds then something has gone wrong - i.e stuck in a loop doing something.

Ideally, the robot should have an escape from any loop, but in the case that it doesn’t manage to escape - is there a way to set a timeout for transactions and/or queue items so that: If a transaction is still processing after 360 seconds throw a new SystemException(“Timeout Reached”)

Thanks in advance.

One simple option is to use the Timeout property of the Invoke Workflow activity, which invokes the Process.xaml in the Process Transaction state.
If the process takes more time than what is specified by this property, it’ll abort the execution of Process.xaml and throw an error like "System exception.Workflow 'Process' has exited due to exceeding the specified Timeout [00:00:10] at Source: UiPath.Executor"

2 Likes

The invoke workflow activity is expecting an TimeSpan variable from me. And this is somehow confusing me, instead of a timespan i want to place a default value. Let’s say 5 Minutes, so that after 5 Minutes a system exception is thrown an a retry is done via the reframework.

But how i habe do i provice these 5 Minutes as a timespan variable to the Invoke Workflow Process activitiy? How can i assign 5 minutes to an timespan variable?

You can use different TimeSpan constructors to create a TimeSpan. For example, if you want to have a 5 seconds span, you can use New TimeSpan(0,0,5).

Another way of doing that is just typing 0:0:5 to the Timeout property.

1 Like