How to get queue items only with low priority

I need for a robot to get jobs that are only low priority.

To check the priority I need first to GetQueueItem (output = TransactionItem) and then I can check the priority like lcase(TransactionItem.Priority.ToString) = “low”

The problem is that by using GetQueueItem the status of this queue item changes to ‘InProgress’, what ever the priority. If the robot only does the low priority, the other ones remain as ‘InProgress’

Can I check the priority before the GetQueueItem? or can I change the status back to new?

1 Like

There is no way to change the transaction item back to New once it is in progress state.

Instead of using Get Transaction item, you can use Get Queue items to check the transaction priority with out changing the state.

Regards,
Karthik Byggari

1 Like

Thanks @KarthikByggari

Would it work as per the attached example? When I get the transaction item afterwards, will it take the specific queue item in the for each loop or do I need to specify it somehow?

Main.xaml (9.0 KB)

@KarthikByggari

I’ve tested it mixing items with different priorities and when I call to GetQueueItem inside the For Each it will get the items with higher priority in the queue. How do I make the robot get the specific item in the For Each with priority = low?

I managed to make it work with the task attached below

What I’m doing is to move the item to another queue. The process it is a bit complex I find. Maybe someone has a better idea.

Main.xaml (14.4 KB)

Hey @selrac,

You can use the postpone activity to set transaction items back to ‘New’ status. Doco here: https://activities.uipath.com/docs/postpone-transaction-item

An example of it’s usage is in the ‘Postponing a Transaction Item’ section of this page: Managing Queues in Studio

Based on this, you could get transaction items in a loop, check if their priority is ‘Low’ by accessing the queueitem attributes. If ‘Low’, then continue processing; if not, postpone transaction.

1 Like