Dear all,
My team too has created a ticket about if it is possible to make sure that a login and a subsequent process will run on the same resource and so far got this answer:
https://help.blueprism.com/Installation-Platform/Configuration/Resource-Pools/1168521882/Can-I-use-Resource-Pools-with-Login-Agent.htm
So we came up with the following solution that could allow us to include Login Manager tasks in the a schedule and still address individual resources in a Resource Pool.
1. All idle resources are logged out.
2. When a schedule is due, Login Agent logs in on a machine. (An Is-Logged-In check or unconditional wait stage is added afterwards, because the resource needs longer to launch automate.exe than the agent allows until it reports success for the login.)
3. The subsequent process gets allocated to the same resource because all other members of the pool are unavailable.
So far, this sounds feasible, but the solution is confronted with a racing condition if multiple logins are scheduled for the same time. In this scenario it could happen that the scheduler has more than one resource to chose for the subsequent process. To amend this, the Environment Locking feature could be added to the Login Agent's login:
2.a) There will be 1 lock for each Resource Pool. The Login Agent attempts to acquire the lock and stores the token. If it can't acquire the lock, it will retry later until a set timeout. This will avoid a situation where more than one login is happening in a Resource Pool.
2.b) The Login Agent performs the login as described in Step #2.
2.c) The Login Agent releases the lock using the stored token and will end immediately.
Any feedback about this idea would be highly appreciated, as it is not easily tested. Our concerns are in particular:
- Can the Environment Locking feature be used inside the Login Agent?
- I feel a bit queasy about using environment locking, because unlocking requires the token. If the token gets lost because Login Agent crashes, this impacts the whole Resource Group. In this case, only an operator can release the lock in Control Room, as we understand it.
Cheers, Lorenz