cancel
Showing results for 
Search instead for 
Did you mean: 

Resource Pool Primary Bot

Anonymous
Not applicable
Hi team,

Is it possible to make primary bot in resource pool. I want my process to run on primary bot in resource pool and when it is down it should run on any available resource. Is it possible?

------------------------------
Sanghamitra Konduri
------------------------------
1 REPLY 1

david.l.morris
Level 15
I don't think this is possible with the current functionality of Resource Pools. If you are just trying to give your bot the chance to try starting on a secondary resource if the primary one is not available in the first place, resource pools are actually a good way to do this, but I don't think you can choose a specific primary resource that will be tried first. It appears to be random to me (Round Robin kind of thing but I can't predict which one is started first). It would just use whatever is available.However, there are other ways to accomplish your goal if you really really need there to be a primary resource that is attempted first. I can think of three ways to do this at the moment. The first two are both weird but easy to do and the third requires a fair amount of thought and set up.

First: You could use the On Exception feature of tasks in a schedule. This kind of blew my mind just now, but I tested it and it does work. Create a schedule with two tasks: Task1 and Task2. Both of them run your process. You have Task1 start your process on Resource1. Set Task1 as the Initial Task in the schedule. Then set Task1's On Exception dropdown to call Task2. Set Task2 to run your process on Resource2. If Task1 fails because Resource1 is offline, then Task2 will be triggered and your process will start on Resource2. Obvious problem with this is that it will run Task2 if Task1 fails for any reason. So, if your business logic throws an unhandled exception to cause a termination, Task2 will start up, which may not be what you want. But I think this'd be fine if you designed your process to be careful in what it does (performing state checks and what not).

Second: You could run the same process twice in a schedule's task on two different resources. You could use Environment Locking to ensure that one of them continues and does the work while the other does not and just stops. Obvious problem here is that you'll consume 2 sessions of your license for a short time. And also I'm not sure if there's really a way to guarantee that the primary resource would be the first to the Environment Lock. It depends on how fast Resource1 runs as to whether he wins the race. 😃

Third: You can use CLI commands to spin up sessions on particular resources or pools based on whatever timing you want or retry logic, etc. This would require an outside app or script that you develop. Some have built this already but I don't think it's been shared for the community to use. I suspect Blue Prism will improve this over time. There is a lot on the development roadmap, I'm sure, but you could also request this as an enhancement.


------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company