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:
- 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.
- 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.
- What is SLA?
For better understanding of Queues Refer this → About Queues and Transactions
Queues are processed in FIFO order, Change the order before you push the items to Queue.
Use “Get Transaction Item” activity → This will set queue item status to “In Progress”
Refer this for SLA → Queues SLA
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:
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”).
- User add item with API button to queue named “new”;
- Robot getting full list of queue items from queue “new”;
- Robot using .Last method with this list to get oldest item;
- 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.
- Activity “DeleteQueueItems” from queue named “new” with item that was retrieved as last.
- Working with item as i need.
- 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.
- Sort your Datatable —> By ascending or descending → Get sorted DT
- Push the sorted DT to Queue → By “Add Queue Item” or “Bulk Add Queue Items”
- Queue will push the items in same order as sorted.
- 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)
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.