Queues explanation

It is a little bit difficult for me to understand what is queues, and how to work with them.
For now i understand that (correct me if I’m wrong, please):

Queue = datatable;
QueueItem = row of datatable, with data in object (specific content) and other things - status…,…,…,;
Transaction = row that is in work.

So i have a questions to work with it:

  1. How i can SORT (not filter) items, that i am getting from queue? Always when i get list with items, the items that i added later is on first place. How i can get, for example, the oldest on the first place (sorted by date)? Or how i can get an oldest item with “Get transaction”? Both of this activities always getting items from new to old.
  2. How i can MANUALLY set status “InProgress” for an item that i get from listOfItems(0)? I tried to do it with “Set progress” with progress parametr “InProgress”, but the studio said, that i can change progress only to transactions, that are in “InProgress” status.
  3. What is SLA?

Thank you!


For better understanding of Queues Refer this → About Queues and Transactions

  1. Queues are processed in FIFO order, Change the order before you push the items to Queue.

  2. Use “Get Transaction Item” activity → This will set queue item status to “In Progress”

  3. Refer this for SLA → Queues SLA

1 Like
  1. What do you mean by change the order before? If i already got an item in queue, and i am adding a new one - it always getting first in Get Items activity. I dont see any options to change the order. Can you explain where i can do it?
  2. Ok, but this activity takes the first “new” item in queue. And the problem is that i cant sort the line from oldest to newest, and it always get the newest item - this is not correct for my process.
  3. So, this is just a counter for a deadline. Ok.

Thank you.

Hello @HomaDzz ,

You can change the order of the Queues by assigning priorities to each item. It will then fetch the items marked with HIGH priority first, then NORMAL, then LOW.

If you want certain items processed before others you will have to use a Switch/IF or similar to categorize the priority of your items before you add them to Queue , with the aforementioned categories (high, normal, low)

You can also filter the GetQueueItem with a reference (that you should also add when using the add to queue activity)

You can find more info about how to manipulate the items you want to add to queue here:

1 Like

Hello, friend! And how do you see it? For example:
I got 100 users with 1 query per user. Every user will add an item to a queue. They doing it with an api button on my own web service. If i will use your advice to split this items with priority i will get the same result, but only in 3 different groups because in array of only LOW, or only NORMAL, or only HIGH priority i will again get the newest from this array of every priority, not an oldest that i need.

I use references to identify who sent the item.

Currently to get the oldest thing from an item list am using this way:
Got 2 queuse - one for new queries (named “new”) and other one for an InProgress and Completed (named “old”).

  1. User add item with API button to queue named “new”;
  2. Robot getting full list of queue items from queue “new”;
  3. Robot using .Last method with this list to get oldest item;
  4. Activity “Add Transaction item” with “Specific data” that i need to use later in process to queue “old”. This is setting to this item status InProgress automatically.
  5. Activity “DeleteQueueItems” from queue named “new” with item that was retrieved as last.
  6. Working with item as i need.
  7. Set it as completed.

To continue work if something went wrong there is check at the beginning of an alghoritm (got any old branch). You can see it at screenshot.

Of course i understand that this is not the best way to solve the task, but it works.

You can change the order before you push the items to Queue.

  1. Sort your Datatable —> By ascending or descending → Get sorted DT
  2. Push the sorted DT to Queue → By “Add Queue Item” or “Bulk Add Queue Items”
  3. Queue will push the items in same order as sorted.
  4. But when you request “Get queue items”, The queue order will be LIFO or Random, As I
    observed till now. (Queues are processed in FIFO order as per the documenation)

This sample xaml is for your reference
Main.xaml (7.3 KB)

1 Like

There was no problem with sorting before uploading. The first question was - how to sort when i take the items back to me from queue:

btw - thanks for your time.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.