cancel
Showing results for 
Search instead for 
Did you mean: 

Continue process after restarting resource?

johwes
Level 4
Hi.

We are experiencing problems in scheduled processes due to the browser extension occasionally not working. We have a process that checks if the extension is working, and if not will restart BP and the runtime resource. 

My question is, can we run this process as part of the error recovery in a scheduled process, so that if the problem is the extension not working it will run the process to restart BP and the resource, and then have it pick up where it left off?

------------------------------
Johanna Westlund
RPA developer
SpareBank 1 Østfold Akershus
/Norway
------------------------------
3 REPLIES 3

John__Carter
Staff
Staff
There is no easy way to achieve this Johanna, as you know the process runs on the RR, so stopping the RR means stopping the session. So the first problem is how to start another session after the RR has restarted. The second (easier) problem is how to have that next session pick up where the first one finished.

It might be possible to use the scheduler's 'On Exception' task, but care is needed to avoid creating an infinite loop where a process fails and the task restarts again and again.

Another option is to have the first session make a delayed command line call just before the process ends. The command line call will keep 'counting down' after the process has ended. Here you can see an example with a 5 second timeout.
18663.png
This means if you use a timeout long enough to allow the RR to restart, then the command to run the next session should succeed. You could probably create a single command that does everything, eg:
  • Wait for current session to end (eg 5s)
  • Restart RR
  • Wait for RR to connect and become available (eg 30s)
  • Start process again
Using the command line means you'll need to think about authentication, security and permissions, but if you create a user with minimal permissions then you can reduce the risks. And assuming you use a work queue then the first session can control the state of the last case it works on before initiating the restart. the next session should just be able to pick the next case and carry on.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Here's an example of a six step command: wait 3s, terminate the RR, wait 5s, restart the RR, wait 10s, restart the process

timeout /t 3 &taskkill /im automate.exe /f /t &timeout /t 5 &"C:\Program Files\Blue Prism Limited\Blue Prism Automate\Automate.exe" /resourcepc /public /port 8101 &timeout /t 10 &"C:\Program Files\Blue Prism Limited\Blue Prism Automate\AutomateC.exe" /run "My Process" /resource "RR123456" /user "My User" MyPassword


------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Thank you, I will definitely look into this!

------------------------------
Johanna Westlund
RPA developer
SpareBank 1 Østfold Akershus
/Norway
------------------------------