Difference Between get queue item and get transaction item

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.

Thanks,
Pratiksha Srivastava

Hi @Pratiksha,

Get Queue items - retrieve a list of transactions from an indicated queue
So it has list of all transaction for the specified queue.

Get transaction - Gets an item from the queue
It has only one transaction item.

Here I have attached the sample project for you.
File :QueueDifference.xaml (5.5 KB)

Regards
Balamurugan

13 Likes

Thanks Balamurugan for the info… Any idea how can robot get only the item which it has put in the queue and not the items put by other robots?

Hi @Pratiksha,
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.

Anyone , pls correct me if I’m wrong!

Regards,
SP

Hi @Pratiksha,

Can you not use two separate queues, one for each bot?

Regards,
Patrick

3 Likes

Yes… That is what I am doing now. :slight_smile:

Hi @Pratiksha,
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.
Thanks,
Yeswanth.

5 Likes

can you tell me the solution to get only current date transactions from queue ? and to put future date transaction back to the queues.

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

But getting error. Please help

1 Like

Hi @amithvs,

Here is the video to know about the Orchestrator. In the end of session you can able to get knowledge about the Queue and Transaction.

Regards
Balamurugan.S

1 Like

thanx. Will have a look. I am getting the queue items by using specific content, but not getting 2nd and 3rd queue items. Getting error saying

“the given key was not present in the dictionary”

Arg1- queue1
Arg2- queue2
Arg3- queue3

For each ITEM in Queue
item.specificcontent(“Arg1”).tostring is working

Then I assigned
Assign A =item.specificcontent(“Arg2”).tostring

Assign B =item.specificcontent(“Arg3”).tostring

Not getting results, getting above error. What should be the data type of assign?

I have to take A and B to do comparison with some other data

Hi @amithvs,

Did you find a solution to this? Please let know

I was able to retrieve queue items. Is that what you are looking for?

1 Like

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)

2 Likes

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.

1 Like

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.

1 Like

@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?

3 Likes

Once an item’s status is changed to In Progress, if I deliberately leave that as it is in the current iteration, can this item be retrieved next time the Get Transaction Item is run?

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.

1 Like

Got it. Thank you.

It turns out I did not know Postpone Transaction can set the status back to New. The solution is simpler than I initially imagined.

1 Like