13-06-19 06:29 PM
My team has been having a discussion about work queues….to use or not to use?
There are many benefits to using these queues when working through several items of data that are processed in the same manner. However there are use cases out there that do not require the processing of repetitive input. I'm working on a process like this at the moment. This process simply goes to an application, clicks a few buttons to download a couple of reports, massages the data in these to reports to come up with another report which is saved to an accessible location for later use by the end users.
To me, using queue processing adds to the complexity of the process. Using the queue for a single work item (not even sure what that item would be in my use case) would seemingly consume BP resources unnecessarily. We are wondering if there are any technical implications around queue usage (or not) around logging, database, future BP releases or whatever that should be considered? There doesn't seem to be much online regarding best practice in terms of using a queue or not.
Again, using work queues is great when the use case calls for it, but what if it does not. Your thoughts?
13-06-19 06:49 PM
18-06-19 05:37 PM
Thanks for your response and insights Heather.
Agreed though, it would be interesting to hear from others on this topic! I do see the value in your reporting and metrics side of things, but curious about how the use of a queue for the sake of using it would impact that, say if it was a single work item that would "initiate" a process.
Thanks again,
Rick
19-06-19 12:30 AM
19-06-19 12:35 PM
15-08-19 03:19 PM
15-08-19 07:10 PM
16-08-19 03:17 PM
I think using Queue is always ideal, I as a developer use Queues for almost all the processes, had a issue with Queue related to use of tags a while ago (fixed) apart from that had no issues even adding large volume of data shouldn't take a more that few seconds. On logging part yes the database fills up quickly if you're saving lots of data in queue which is required by some business and yes that can impact bot performance but there Blue Prism Database Maintenance document that will help you with this, also small amount of data I don't think will have a large impact on performance. In short Queue is the way to go, It helps in designing scalable, multi-bot solutions and almost always help keep track of data.
@Rick Burrows
In your scenario you can create a folder with random name (or with timestamp) add it to Queue as key, then save the reports you download to this folder update the item that files have been downloaded, if in case the process fails while generating the second report then you don't have to download the files again, also it will help give you proof of work that the bot performed the right download and generated the right report (some businesses want this). You can separate out downloading and report generation if you'll be downloading different files again and again, using one bot to download and multiple bots to create reports.
@Deborah Yarosh
1. Ok - in this scenario not using a Queue can work (although you can still use it for reporting what referral id was submitted), but then why use Blue Prism in first place, there are free to use tools (MIT licensed) which obviously are not as feature rich as Blue Prism but will help you in this scenario without any hiccups and also helps save you in licensing.
2. I agree with @Heather Ruhl you can have a scenario where bot keeps picking up the same request (a Business exception) again and again if there are no more item to process
18-08-19 02:31 PM
I really love the insights in this thread and the discussion around work queues and their uses. I want to propose a slightly different way of looking at the question, though - not "should work queues always be used" but "what is the purpose of a work queue inside of a BP Automation"? And while it's a discussion that you could drag on extensively, the short version of the answer to me is "organizing/prioritizing work". And from that perspective, the question is less "does a work queue always need to be used" and more "has the purpose of a work queue been fulfilled, either using a work queue or not"?
To @Deborah Yarosh's first scenario, which doesn't seem to naturally include a use for a work queue, what's actually triggering this work? The assumption proposed in the scenario was that it was scheduled - which brings up the point that functionally, there's sometimes very little operational difference between a schedule-driven process of a certain type and a *data*-driven process of a similar type. Don't forget here that you can create a work queue item in Blue Prism with a future date. You could re-implement the process - instead of as a stand-alone process scheduled every half hour to run this single thread - a meta-process monitoring a bank of 3, 5, 10, however many work queues... And one of those work queues holds the object "referral submission trigger". Whenever it finishes whatever it's working on, if it comes back and finds that work item has matured (hit its execution time), it then runs the process and - as the last step - inserts a new one 30 minutes into the future. Not only does this kind of model allow you to share the work over a larger pool of workers (giving you some more resilience against machine failure) but lets you have more efficient use of the resource that is tasked to this job; instead of being required to have a clear window in its schedule every 30 minutes for this, it implicitly takes care of it at approximately the right time with no gap in its work.
My point is... Work Queues are designed to organize the work that needs to be done. In Deborah's first example, it's not that that prioritization doesn't need to happen; it's that it's being done implicitly by the scheduler acting in the place a work queue otherwise would.
As another thought, don't forget that work queues and work items can act in a second manner - they can provide natural process segmentation allowing for more flexible/dynamic process creation, and assisting with things like disaster recovery.
What I mean by process segmentation is this: let's say you have a business process you're automating that involves reading in an e-mail from a mailbox, moving it to a new mail folder, parsing some data out of it, creating a new account in an internal web site, and submitting a ticket on a 3rd-party web site to link the two accounts together. Because of the nature of the process, the only natural place to utilize a work queue from a simpler point of view is "pooling" those e-mails; but there's more you can look at here. What if, for example, you actually had 10 different business processes that all had to create accounts in this internal web site? That segment of the business process we're discussing could be extracted with a work queue. Similarly, the portion of work for creating tickets in the 3rd-party system can be extracted using a second work queue and separate worker pool. Then, those little process fragments can be used by multiple business processes by the simple expedient of sharing an inbound work queue; and if those processes need to be sequential instead of parallel, that can still be accomplished with just a little bit of metadata indicating the parent process it was submitted from to allow the follow-on work queue items to be created in line.
Obviously, for smaller and simpler situations, this type of complexity is totally unnecessary; but for more complex situations where you have numerous business processes overlapping activities, it can help create great efficiencies and save duplicate effort.
As to the thought of Work Queues assisting with data recovery... The primary nature of a work queue item is to save the work's state. They can be updated - using tags or status or even meta-data stored inside the work queue - at each stage of a process, or if the process is segmented then passed from work queue to work queue. Then if there's a system failure, the work queue item itself is telling the story of what's already been done and what needs to be done next; in many cases, no human intervention is necessary, and a well-constructed process can see from the queue item exactly what needs to be done next to pick up where it was left off.
So I apologize for the big wall of text... But Work Queues are actually a fascinating and deep topic, which I really enjoy exploring. Hope this is interesting to you folks.