SAP.ReadStatusbar activity does not obey the Timeout property if the SAP session has hung or disconnected

When using the SAP.ReadStatusbar activity, if your SAP session is disconnected, hangs or has a execution timeout (anything that keeps the gui scripting busy), the timeout will never be triggered so no system exception is triggered.

Whilst a rare combination of events, we have experienced this issue a few times in production. Our current workaround is to have a parallel process with a stopwatch running to kill the sap session after our maximum wait time has been reached. Once the SAP process has been killed, the selector will fail and trigger a system exception.

Would be great if this activity behaved as others do and stick to the timeouts.

Activity pack(s) used;

UiPath.UIAutomation.Activities 20.10.9
UiPath.System.Activities 2.9.5


I too would like to know the answer to this! Causing huge headaches.

i also use a parallel process (with isolated property) to have a stopwatch on a separate thread handle this for now.

But i found an alternative which is directly use SAP GUI scripting (using vbscript) for some of the actions such as download that sometimes causes SAP to hang. Then i use uipath’s invoke vbscript activity that comes with a timeout property to call this script. Using this method, the timeout does trigger even if SAP is disconnected/hangs

1 Like

Hi @cconnors

Let me check what is going on here…

Stay tuned. I will be back :slight_smile:

Best regards, Lev


Hi all,

Thanks for your feedback!

Can you please tell me which statement better describes your situation?

  1. The activity (SAP.ReadStatusBar or other, like a Click which triggers a time-consuming operation in SAP) would succeed if you gave it enough time. But you still want it to fail, if it takes longer than a precise amount of time. Eg: the activity succeeds in 31 seconds, but you want it to fail if timeout is set to 30 seconds.

  2. The activity has no chance to succeed, no matter how big the timeout is, due to some serious internal error in SAP, for instance. So, the SAP application hangs, this causes the UiPath Robot to also hang and you don’t like this. You would like the UiPath Robot to detect that the target application is unresponsive and throw an exception, instead of it staying also hanged.

Best regards,


Hi Lulian,

Thanks for reaching out.

Generally scenario 2 best fits our scenario, however both scenarios can be true for us at different times.

For instance, scenario 1 would be the scenario if we had a 10 minute timeout specified for a vendor line search after which we would want this to fail. To succeed this search might take 1 hour or more, depending on the search required for the process and the size of the vendor account. (we have experienced a scenario where a search was active for 12+hours and still going)

Whereas scenario 2 would be more suitable for scenarios where SAP might disconnect unexpectedly or otherwise hang.

In both cases we would like the timeout property to be our control to specify how long an activity should wait. We can then simply specify how long to wait for a result, after which the exception trigger can be caught and handled as required for the specific process. However if it were possible to detect a fully unresponsive SAP session it would be ideal to have this throw an exception when it occurs rather than wait for the timeout.


1 Like