cancel
Showing results for 
Search instead for 
Did you mean: 

SAP stuck until transaction is done

IsmaelRamirez
Level 3
Hi all, Is there a way to make BP continue after executing any action? Right now is stuck in the Navigate action, not going further until the transaction is done so if you are exporting any table and for some reason SAP is stuck, we are not able to stop the process or do anything until we manually close SAP/manually stop the on going transaction in the machine. We are using BP version 5.0.12.0. Thanks a lot for your hint/tips 🙂
7 REPLIES 7

John__Carter
Staff
Staff
It's a difficult problem, BP is waiting for a response that will never come. I think our development team are planning on introducing a 'max response time' for this kind of situation, but that won't solve your immediate problem. The real issue is why does SAP become unresponsive - maybe the table is very large or there is a network problem? A possible workaround is to try another 'thread of execution' so that current thread is not blocked. It's not that easy to do, but it involves creating a second process who's only job is to attach to SAP and press Export. The first process runs this second process via the command line (not as a sub-process) so it does not have to wait for it to complete. I'm not 100% sure if this will work because the first process will still have to wait for something, and if SAP is unresponsive it could be that even a wait stage gets blocked. An easy way to simulate the second process is if you press export manually and then see if the first process can wait successfully.

IsmaelRamirez
Level 3
You are right on this ""- The real issue is why does SAP become unresponsive -"". It's not happening all the time but just randomly so we can't predict why that is happening(not a large table), if we re-run request, then it works, so maybe it's something in SAP side that should be covered so it is at least timing out (not the case, it is stuck forever, +5 hours). You gave me a good idea with the Command line workaround. I think that might work, because we can create a bat file launching that process that is just going to click execute, so the initial process will go further to the wait stage until the expected result is there. One question, doing that the ""Resource will not be too busy to run the second process"", right? I don't know what happens if the resource is already running the first process. Thanks a lot for your ideas. Ismael.

John__Carter
Staff
Staff
Yes, to run a second process you have to circumvent the 'Resource is busy' problem, which comes from the Run Mode of the objects. Basically you want another way to initiate the export that the main process does not need a response from. A batch file might be the answer.

IsmaelRamirez
Level 3
Good&Bad news about this topic. I created the batch file and when debugging it´s completely fine and the solution works perfectly! Now the issue is when I run Process A in control room, then when running Process B via batch/command line, I can´t run it because of what I suggested before, I am getting an error saying ""ERROR: failed to create session - UNAVAILABLE"". Which I assume it is the same than if I run 2 processes at the same time in the same machine via control room. Is there a way to avoid this and make it works (how to change the Run Mode)? Because if there is a way, we have solved this issue and actually we could use it for more actions that needs to wait for a response of other systems and it can fail. Thanks a lot, Ismael.

IsmaelRamirez
Level 3
Does anyone knows about how to run 2 processes in the same resource at the same time one of them being launched with a batch file? The Run Mode of the object used in the Process is set up as ""Background"", but I still receive the following error ""ERROR: failed to create session - UNAVAILABLE"".

Denis__Dennehy
Level 15
You cannot run two process sessions at the same time on the same resource. For parellel running within the same desktop environment (of multiple Background tasks) you would need to run multipe resourcepcs on the desktop using different port numbers (you can specify the port number to use as part of the command that starts the automation resource - for example automate /resourcepc /public /invisible /port 4321). You will then be able to background processes on the different resources running on the same PC. Points of note: Blue Prism license based upon maximum concurrent sessions running in your production environment. So 4 resources running processes concurrently on the same PC will stiull require 4 Blue Prism licenses. Ensure your tasks truely are background in nature - with no global interactions. Only one application GUI can be active and used at a time so if you are using global clicks/sendkeys anywhere the object should be set to Foreground rather than Background (my experience is there is almost always Global Interactions somewhere in end-to-end business processes).

PriyankaTailor
Level 3
Hi, not entirely robust but thought I'd share - a quick workaround for this is to use Surface Automation. Another option is to use the application modeller settings to create an auto-time out. To do this go through the application modeller wizard and make sure your Application Manager mode is set to an external mode. You then get the option to provide a time that the object will wait for the application to respond before throwing an exception. Then just use exception handling to manage the exception that is thrown when SAP gets ""stuck"". I haven't sucessfully used this option as I haven't found a good generic timeframe to enter here. Maybe you'll have more luck! Hope it helps.