cancel
Showing results for 
Search instead for 
Did you mean: 

Populating Work Queue through API

sridharpp
Level 3
Hello, Has anyone had any experience of exploring the use of APIs to populate the Blueprism Work queue? Im curious to understand the pros and cons of using that as an approach to load queues.   Thanks
6 REPLIES 6

BenKirimlidis
Level 7
Yes.  Do this. We have an API we make calls to to populate a few work queues.  We played around with using CSV and Excel inputs.  But human users frequently interfere with the files and open/edit them which causes problems. Using an API eliminates a lot of human error.  We use APIs everywhere we can now, makes development so much easier.  Cannot recommend it enough.

AmiBarrett
Level 12
We wrote a couple as well that just run some queries directly against the BP database. It's pretty much eliminated any need to have a bot monitor an inbox for an input file, when we can just have the end user upload it to a web page. This plays perfectly with our pooled setup.

Hi,  just out of curiosity you are writing records directly into BPWorkQueueItem or you created it through exposing an Action ""Add To Queue"" as a web service? The latter I know and used but the first one anybody implemented? It is quite dangerous IMHO.

AmiBarrett
Level 12
Zdenek - Thanks for the catch there. I was indeed slightly inaccurate. The web upload calls a stored procedure we wrote. Once the file is validated, the file's data is inserted into a custom table in our DB. As soon as data is present, our controller automatically kicks off a feeder process to insert the data into a work queue using the ""Add To Queue"" action. In a similar fashion, the controller will then automatically spin up as many robots as-needed/available to work the queue.

Anonymous
Not applicable
Hey there, @amibarett that sounds awesome. We are currently working on an multiple active queue management for some cross-project ressource loadbalancing / usage. Is your work queue an active queue which ""spin's up as many robots as needed""? Furthermore I would like to know how your controller starts these processes.  Since we couldn't figure out how an active queue could do this byself our approach was to use the AutomateC.exe to increase set the ""Target Resources"" of an active queue or set the Property in the Blue Prism Database. Best regards Marcel

AmiBarrett
Level 12
No, we do not have the queues set as active. Our controller monitors the status of each work queue and will use AutomateC to start a process on the next available resource, based on a mapping lookup table we have in a custom SQL db. So if Work Queue A has data to be worked, run the process mapped to that queue in said table. We do not have our resources in a pool as defined by Blue Prism - the pool is only created by how the controller handles the resources. We have it query the status of the machines either via SQL lookup or AutomateC call. Theoretically, you could also have a process do the exact same thing in lieu of relying on the built-in controller to kick everything off.