How to process/fetch queue items having particular value

Hi All,

I have one shared queue where multiple users adding data to the same queue. When they run the job , robot has to process queue item belongs to that user. In the queue item details, I will be having user id. Can anyone let me know how to achieve this.

Hi @Sailaja_Pasupuleti

You will have UserID value in a variable right. Place an If condition pass the below syntax:

If
UserID.ToString.Equals(in_Transactionitem.SpecificContent("UserID").ToString)
Then
   \\ Do required process
Else
   \\ Do required process
End If

If true do the required process of false do the required process.

Hope it helps

Hi @Sailaja_Pasupuleti

Users run in attended automation, right ?
The project is using ReFramework ?
The shared queue was set up to use unique reference ?

You can add the logged windows user account (or other unique identified environment variable) as queue item reference (if queue wasn´t set up to use unique reference) getting dynamically using:

str_reference = Environment.UserName

Then when you get the items to process using Get Transaction Item you can pass again the str_reference in Reference Field like this

This way add or get queue items from shared queue depends the logged user. You can´t fetch queue items based in specific content but you can do it using reference field.

Even in case you have different bots (dispatcher and performer) the above strategy will work fine

Thanks @rikulsilva for the quick solution. It was very helpful. Yes, I am using the Reframework and have dispatcher and performer processes, it is attended automation and queue was set up to unique reference. Should I pass performer argument value to reference field in case of another unique reference(e.g., email address)

Hi @Sailaja_Pasupuleti

Glad to help

I don’t recomend get the queue item based in queue details because you need first build a logic to get queue items using Get queue Items activity then check if the queue item belongs to that user before use Get Transaction Item passing the queue item reference to start process it.

Is it possible to change the unique reference in dispatcher to add the logged windows account user (or another one) + your current unique reference ? if so, you can use Starts With filter strategy

image

Sure. Will add the logged windows account in the dispatcher process. As suggested, will build a logic to get queue items and verify if the queue item belongs to the logged user. Once again, thanks for the solution. Will mark it as solution.

1 Like

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