Picking items from the work Queue mechanism

Eman

New Member
Hello,

I wanted to ask how to implement the following scenario:

-I have 12 bots running for the same process.
-All 12 bots are picking items from the same Queue
-I want the first 6 robots to pick the items from up going to down, and the other 6 to pick the items from down going to up, but at the end, each robot should go through all the available items of the queue without skipping of any and without splitting the queue.

How this could be implemented?

Another question, why the items are not sorted in the Queue as they were sorted in the source file when using add to Queue action? and I can't sort it from the collection because there is no key to sort according to it even ascending or descending.

Thanks,
 

Pete_L

Active Member
I'm trying to think of a way to accomplish this, but so far I haven't been able to come up with any ideas. Opening a BP Support ticket is probably your best bet for finding a solution. The Get Next Item stage in your process will always pick the next pending item, and you only have limited ways to make that selection. For example, you can filter by Tag, use the Status, or use the Priority (check the Work Queues Guide on the BP Portal for full details).

As for sorting, there has to be a key field for the queue. It is defined when you create the Work Queue in the System tab. But you only read 1 work item at a time from the queue, so why would you need to sort that? Are you asking how to sort the work items IN the queue? There is no way that I am aware of to do that.

Your other question regarding the location in the queue not matching the input order of the source file has also been a pet peeve of mine. BP Support is your best be here also; they should be able to explain it. I have noticed, though, that regardless of how the work items are displayed in the queue, they are processed in a First In First Out manner.

Please let us know if you find a solution to your "read from top to bottom and bottom to top" question. As well, please relay any info you get from BP Support regarding the queue order, as many people would find it interesting to know the answer.
 

tomahawk1

New Member
Do you get excel worksheet as collection and then load it to queue in 1 go? Haven't tried, but theoretically, I'd loop that collection and add row by row to queue. I'd try to do it this way:
1) Get Worksheet as Collection
2) Get number of rows of that collection (e.g. 100 rows)
3) Loop collection and add single row to queue
4) While adding to queue, assign priority to current row in this manner: 1st row = priority 1, 2nd row = priority 100, 3rd row = priority 2, 4th row = priority 99 etc, with help of counter data items.
Then, 12 robots should be picking items as they were displayed in worksheet in following order: 1st, last, 2nd, one before last etc.
I hope it makes sense.
 
Top