Timeout property if the SAP session has hang or disconnected

Hello Everyone, HI @cconnors

Just a quick update from my side to everyone in this post.

We are in the middle of finalizing the new implementation for SAP Hard Timeout topic discussed above. It required quite a lot of thinking, speaking, alignments with you (customers and community member) and also with our internal engineering.

Next week we should start extensive testing of new feature before releasing to the community.

I will provide an update here and will ask for you cooperation and validation of the solution.

Best regards, Lev

1 Like

@Darshana_K

Theres a marketplace snippet for this now, you can replace your parallel activity with it. If theres a success status in 2 minutes, it wont wait 30 minutes, if theres no response it will wait for 30 minutes (or the time you specify).

After the new SAP Hard Timeout feature is released i guess you probably wont need this snippet

1 Like

Thanks for the update @LevKushnir.

Will this new implementation also include the improved SAP disconnection handling we had discussed? - selector exception timeout is thrown on or shortly after SAP disconnects.

1 Like

HI @cconnors

This was the plan :slight_smile: → “Ability to recover robot from the lost connection”

Looking forward to the testing on customer side.

Stay tuned

Lev

2 Likes

HI Team, Hi Chris (@cconnors), Hi Joe (@s3vn),

With UiAutomation Activity Pack 22.2 we have released a new feature, which we are calling
Enforcing the hard timeout for SAP WinGUI

This parameter/settings/variable will ensure, that SAP activities will be enforced to terminate after a predefined timeout.

Timeout can be set on activity level, here:

Use case 1:
You are in SAP process, performing some activities in SAP and e.g pressing button “show me report”. This activity is taking a long time, as SAP need to collect the data, prepare report, SAP is working.

If “Enforcing the hard timeout” is activated, the UiPath Robot will terminate the activity execution and will throw an error after the timeout specified in the activity target.
You can catch and handle this error message in a Try & Catch activity.

Use case 2:
You are in SAP process, performing some activities in SAP, and SAP has a network issue and robot is going to lose the connection to SAP.
If “Enforcing the hard timeout” is activated, the UiPath Robot will terminate the activity execution and will throw an error after the timeout specified in the activity target.
You can catch and handle this error message in a Try & Catch activity.


To be able to use Enforcing the hard timeout for SAP WinGUI in Studio

  1. Upgrade to UiAutomation Activity Pack 22.2-preview

  2. Use Invoke Activity as the FIRST and the TOP activity in your workflow
    (THIS IS MUST HAVE. IT MUST BE ACTIVITY NUMBER ONE in your workflow)

  3. Add following code:
    System.Environment.SetEnvironmentVariable ("UIPATH_SAP_TIMEOUT_ENFORCED", "1")

Please consider this solution as a temporary and as a preview.

With Release 22.4 we are about to improve the UX to simplify the usage.

CALL TO ACTION: We need your support and feedback in trying this out. Please let me know!

Thanks, Lev

2 Likes

Hi @3175472466 : Thanks! Sure will try that

Hi Lev,

Thanks for your attention to this issue.

Edit: Just saw that now there is a project configuration available, so I guess it applies to the whole project, and using the Invoke Code is no longer necessary.

When leaving the Timeout property empty, do we get the old behavior of letting SAP run as long as needed or does it force a default timeout (30sec for example)?

Hi @viniciussm

If the Timeout property is left empty, then:

  • the value from project settings is used (30 seconds by default)
  • the Robot will throw an exception if the activity doesn’t succeed until this timeout expires

So, if you leave Timeout empty you won’t get the old behavior but, depending on your automation scenario, there are multiple approaches that could work.

  • Eg. #1: If most activities are expected to succeed in less than 30 seconds, just extend the timeout of those activities which are expected to last longer.

  • Eg. #2: If most activities are expected to succeed after a longer time, let’s say 10 minutes, then update the default timeout in project settings to 10 minutes and shorten the Timeout in the few activities that are expected to succeed faster.

  • Eg. #3: If you want just a part of your automation to preserve the old behavior, then extract it to a separate project with Enforce Timeout OFF, and invoke it from the original project/workflow.

And so on… If you have other questions please tell.

2 Likes

No further questions, that was all.

Thank you for the detailed explanation and examples, @iulian.mircea!

1 Like