Can anyone help me in understanding difference between ‘get queue item’ and ‘get transaction item’?
I need my bots to only get those items from the queue which they have added.
For eg: 2 bots are working simultaneously putting 6 and 7 items in the queue respectively, then these bots should only fetch and work on the items that they have put in. I can see filter on reference field in ‘Get queue item’ but. ‘Get queue item’ is not locking a ‘new’ item.
To my knowledge, I don’t think we can fetch items from queue that are added by one robot but not other. As per the functionality of queues, multiple robots can add items in one queue and multiple robots can process transactions in a queue. So, Queues will get input from many robots but can not identify robot from which it got the item.
I know this is a late reply for your post, but hoping this can help someone else looking for the same solution:
What I can suggest is to write your own functionality for this. you can add a new field for the transaction item like robot id and assign it to 1 for 1st robot and 2 for second robot. while retrieving the transaction you can check that field, if that matches the current robot you can proceed with the regular operation. If robot id doesn’t match, we can upload that item back to the queue again.
hey can you help me with this… I am having a queue. How to get each items of the queue and so some operation. Which activity should I use? I am having a queue of 200 items. Take first item do some operations and so…
I used Get Queue item
Get transaction item
And For each
Difference between ‘Get Queue Items’ and ‘Get Transaction Item’
If you just want the top item from the Queue, you can use
‘Get Transaction Item’ , but if you want all the items in the Queue to be stored in a collection and later you process each item , then go for ‘Get Queue Items’.
Get Que Items (not Get Que Item) :
It is clear that it is getting ALL items from the Queue.
Get Transaction Item - this is used to get one item from the front of the queue.( like ‘deque’ operation in Queue data structure)
I am confused about getQueueItems. What I was expecting is you would filter queue items to some subset for processing. Then you would process them one by one (say enter transaction values into some program, disburse payment, etc.) Once done it would transition to Successful. However, I can’t seem to find anything that lets me change the status to In Progress or Successful.
Set transaction status fails if you do that. So does set transaction Progress. So if I use GetQueueItems and then process them, I will have submitted a bunch of work, and it will still stay in the “New” status which could lead to duplicate processing.
Likewise, the getTransactionItem field doesn’t allow you to pick a specific item, so I can’t select the first item from GetQueueItems and then select that specific item from getTransactionItem.
So that leaves me thinking GetQueueItems isn’t really meant for processing a transaction, but for possibly getting queue statistics. What is a real world use case of that activity? It seems so counter-intuitive.
Also the idea that you can fully process a GetQueueItem but not mark it complete is very dangerous in my opinion.
This is roughly the right answer, although there are for sure other use cases where you need to access a sub-set of queue items to pull some extra information / adapt something / postpone something (by using the Postpone Transaction Item activity which can take a queue item variable as input).
In general though, the Get Transaction Item activity is the one used to actually process the item, as pulling a queue item using this activity will automatically change its status to In Progress.
@bijun45 Get Transaction Item - does not retrieve top item, unless by top you mean ‘oldest’, Orchestrator queue works on ‘FIFO’ principle, unless you specify a criteria for retrieving queue items. By default the status is set to ‘In Progress’. Use Set transaction Status to set further status of failed or success depending on the outcome of the transaction. You can set reason behind failed transaction.
Get Queue Items - retrieves only 100 items from the queue at one time. Although you can use a loop to retrieve all queue items. Don’t know why would you like to retrieve all queue items at once? Do you want to delete all of them in one go?
That’s not possible and it’s not a good practice to leave a Q Item in progress if it’s not being worked upon. ‘In Progress’ Q Items will change status to abandon after 48 hours or so.
From your question: If you need same QItem to be processed next time around, then re-add the same QItem into the queue on failure or if you find that data is not complete in the queue at this point in time.
Mind you this gets complex and frankly tedius to maintain in the long run.
If you use Unique Reference and maintain a list of References for the Q Items that need to be reworked you can use Reference to pick the queue item you need to process.
You can also have Main Queue for first time Q Items and Rework Queue for items that need having a go for multiple times if you don’t want to maintain unique references.