01-11-23 12:56 PM
Hello - I am working on a project that is going to require multiple robots to be used simultaneously and I am trying to figure out the best way to have Blue Prism get the job done. The application I am automating has 100 entities - each entity can be used exclusively by a single login.
Let's say we have entities E1, E2, E3, E4, E5, EX (I have about 100 entities to process). Let's also assume we have 3 Blue Prism instances: BP1, BP2, BP3.
Right now, I am reading in data to a Blue Prism queue. BP1 can work on E1. BP2 can work on E2. BP3 can work on E3. If BP2 finishes with its current entity, it could move on to E4.
What is the best practice of implementing a "first come, first serve" to keep the BP instances busy? Any articles I can read to learn how to set this up?
We have not utilized multiple BP instances yet. All of our current automations have been ran on a single BP instance and have been easy to schedule. Just trying to make sure I am on the right track for using BP at a bigger scale.
Answered! Go to Answer.
02-11-23 10:41 AM
Hi Chris a BP queue is by default 'first come first served', and it contains logic to ensure that a queue item cannot be locked by multiple instances of a process. So if your design requirement is 'all instances should work whichever item is next until there are no more items', then you don't need to do anything. Just use Get Next Item followed by a Decision to test if an item was received or not (ie [Item ID]<>"").
You may have a project where the requirement is to work items in a particular order, and you can achieve that by applying tags when adding items to the queue and then using the Tag Filter input parameter in Get Next Item. That way you do things like 'work all items tagged as Joint Account first, the do all Loan Accounts, then Savings Accounts, then Credit Card Accounts.
Another option is to assign a Priority number when adding items, eg Joint=1, Loan=2, Savings=3, Card=4. Then Get Next Item will automatically give you all the P1s first, then all the P2s etc.
When considering how an automation will run in parallel, think whether there are any steps that you don't want to be replicated across all machines. Typically this will be when filling the queue, because you don't want every instance loading the same input data and creating duplicate queue items. This is where Environment Locks come in. Think of an EL as a permission token, where all instances compete for a single token, and the winner of the token is the one allowed to perform the 'special action' (eg load the queue) and the losers have to take a different direction (eg wait until the queue is loaded). For example:
02-11-23 10:41 AM
Hi Chris a BP queue is by default 'first come first served', and it contains logic to ensure that a queue item cannot be locked by multiple instances of a process. So if your design requirement is 'all instances should work whichever item is next until there are no more items', then you don't need to do anything. Just use Get Next Item followed by a Decision to test if an item was received or not (ie [Item ID]<>"").
You may have a project where the requirement is to work items in a particular order, and you can achieve that by applying tags when adding items to the queue and then using the Tag Filter input parameter in Get Next Item. That way you do things like 'work all items tagged as Joint Account first, the do all Loan Accounts, then Savings Accounts, then Credit Card Accounts.
Another option is to assign a Priority number when adding items, eg Joint=1, Loan=2, Savings=3, Card=4. Then Get Next Item will automatically give you all the P1s first, then all the P2s etc.
When considering how an automation will run in parallel, think whether there are any steps that you don't want to be replicated across all machines. Typically this will be when filling the queue, because you don't want every instance loading the same input data and creating duplicate queue items. This is where Environment Locks come in. Think of an EL as a permission token, where all instances compete for a single token, and the winner of the token is the one allowed to perform the 'special action' (eg load the queue) and the losers have to take a different direction (eg wait until the queue is loaded). For example:
02-11-23 10:43 AM
https://portal.blueprism.com/products/templates/process-examples-instruction-guide
https://portal.blueprism.com/products/templates/process-examples
https://portal.blueprism.com/products/developer-jumpstart
------------------------------
John Carter
Blue Prism
------------------------------
02-11-23 12:09 PM
Thanks John - very good information. I think I am on the correct trajectory based on what I'm reading in your reply.
I need to implement the environmental lock on my load queue process - I had been manually assigning it to a specific system.
02-11-23 01:09 PM
Very good Chris. If you import the release of 'process examples' you'll find a page that shows how to do it in combination with exception handling.
02-11-23 09:37 PM
Hi Chris,
Just a fair warning. Environment Locks are notorious and can stall your process for a long time if you are not paying attention.
I would recommend you to use its full potential, ie, all the properties that are available to create a stale lock check logic.
This prevents a bot going on warning while environment locked from stalling the whole process for hours.
Do tell me if you need help around the stale lock thingy. I use it all the time 🙂
Hope this helps!
03-11-23 10:10 AM
When you write '3 Blue Prism instances' you mean '3 digital workers / runtime resources'? Because a Blue Prism instances sounds more like BP server instances.
The term 'entity' is used for work items? (ie an work item is one entry in the work queue)
With 'entity' (work item) be used exclusively by a single login' you mean a 'digital worker logged in a runtime resource' and not necessarily to different Windows logins?
Just for clarification and maybe it helps you to know the commonly used terminology for further searches and queries. eg when searching for 'Advanced Work Queues' in BP University (the online training portal)