The whole explanation was provided on 18th May by Iulian. Read it carefully.
HI @cconnors
Please use this solution, which should solve the “SAP Freezing/SAP Hanging” troubles:
Use Invoke Workflow with a timeout while executing it Isolated (it will run in a separate windows process). This timeout value would be the expected maximum workflow execution duration + extra time as buffer.
If sap freezes and the workflow invocation reaches the timeout you would have the exception thrown and you can handle it in your workflow as you desire.
So summary of solution:
Invoke Workflow File" with the “Isolated” property checked + Timeout property set
Best regards, Lev
Hi Lev,
Just so i understand clearly. This effectively means i need to redesign existing solutions that have this scenario since updating our product version? If so thats a major concern with the stability of your product and i’ll need to discuss with our account manager.
HI @cconnors
I am hearing a frustration in your message. Your statement is not fully right.
“SAP is hanging”, “SAP is having a network issues”, “SAP is freezing” and you are blaming “stability of UiPath Product” for it
Lets connect to discuss this further and let me see your case.
Best regards, Lev
I would have to agree with @cconnors here. I did not have an issue with “SAP hanging” until I updated UIPath to use the newest activities. All of my SAP bots that have not updated do not have the hanging issue…and if SAP does hang UIPath doesn’t hang and is able to kill the process and restart. I’m not sure what changed with the newest activities, but I feel like there may be a bug somewhere in them.
Please describe the issue as precise as possible. “Updated to the newest activity…”
From what to what? and what has happened?
It can be a bug! We are not perfect, but we are open and hearing to customer and community.
We just need to find the exact place and also in the best case to be able to reproduce the stuff.
Help me to find the root cause and I will make UiPath even better.
Thanks for your support @cconnors and @s3vn
Best regards, Lev
To clarify, I updated the packages to the newest versions. The issue started occurring after that change. Unfortunately I don’t think it is linked to a specific Activity because the bot/SAP was always hanging in the same area so I changed the Type Into activity to an SAP Call Transaction activity and the bot/SAP continued to hang in the same area. The workaround you suggested me (of invoking a workflow with Isolated checked) is working, but SAP/UIPath continues to hang.
Previous Package Versions:
Current Package Versions:
Hi,
I tried rolling back a test project to your old package versions, but continued to see the same issue.
So far i’ve been able to determine that this issue is specific to the type of activity being attempted at the time of SAP being unavailable (due to either being busy executing or being disconnected). Click and Read Status Bar are the two common offenders.
I am having the issue with Type Into and Call Transaction activities. Mine was always occurring at the same spot in the process and changing the activity did not resolve the issue.
Hello @LevKushnir ,
Even I had faced a similar issue. I had not specified any timeout for the SAP “Read status bar” activity. So the default had to be 30 sec but I have seen instances where the activity was waiting for more than 30 minutes and still fetched the right results. This works well for a happy path scenario.
But when I have large data to process , SAP gives a memory or a restarted popup and goes into a hang state. In this scenario uipath doesn’t recognize the same and is still executing the “Read status bar” activity
Could you help me understand the below scenario:
- What is the maximum default timeout for the SAP “Read status bar” activity to eventually fail
- In case I am using a parallel activity as the solution , with Invoke workflow that has isolated property and timeout set as 30 min for the workflow that checks the memory popup. What would happen if the Read status bar gets a success status in like 2 minutes. Would the parallel block wait for 2 minutes or 30 min(timeout of the Invoke workflow that checks the SAP hang popups)
HI @Darshana_K
When you performing some activities in SAP, we (UiPath) are speaking to SAP API scripting interface and “asking” in which state it is. It can be Click, it can be Read Statusbar - does not matter.
In your happy path scenario above. SAP was busy and active, this is the reason, why we were waiting for 30 minutes to proceed. It can be 2 seconds or 60 minutes. The key point is: SAP is working / the session is busy / the element Statusbar is available on the screen.
Now to your questions
-
There is no timeout to fail for a good execution.
-
The question is too unclear and too much theoretical (would, would, would).
You are mixing and bringing too much different topics together: SAP Timeout, SAP Hanging, Parallel Execution, Invoke Workflows.
If you want to discuss in detail, please create a new thread and lets starts with proper definition of what’s expected from the robot.
Then we can have a clear discussion and clear answers
Best regards, Lev
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
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
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.
HI @cconnors
This was the plan → “Ability to recover robot from the lost connection”
Looking forward to the testing on customer side.
Stay tuned
Lev
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
-
Upgrade to UiAutomation Activity Pack 22.2-preview
-
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) -
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
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.
No further questions, that was all.
Thank you for the detailed explanation and examples, @iulian.mircea!