I’m quite new to UIPath but have developed several processes in BluePrism. In BluePrism im able to check if an item exists in a queue before adding it, but i can’t seem to find a way to do it in UIPath.
Does anyone have a tip for how to do this?
Basically i dont want to add an item to the orchestrator queue if an item with a similar reference exists.
Its seems the link you provided is covering a slightly different topic.
I looked at the search functionality for queue item reference, but is only available from Orchestrator.
Is there a way for me to say:
Search Queue with name ‘foo’ for item with reference ‘bar’ and get a boolean back if it exists or not?
Hi Nils, I too am more used to Blue Prism and have recently starting working in UiPath. BP has a very rich business object functionality for queue handling and I have not yet seen any equivalent in UiPath. This is a real area for improvement. The reference feature in 2017.1 is the first step (equivalent of Tags in Blue Prism) but still it lacks the same level of support. I am considering hitting the data model in the database and writing some of my own functions if I can find the correct tables!
At the moment this functionality is not available, unless you use SQL to query the queue directly.
In the next version we are looking to EnforceUniqueReference on the queue, which means that if you try and add an item with the same reference you would get a duplicate error which you can catch and deal with.
We are also introducing activities to be able to query the queue, so in this instance you would be able to query the queue and check if an item already exists based on any data within the queue item.
Get Queue Items should be able to do this. The activity allows you to search a queue for items with a specific reference value. If the Queue is created with Unique Reference = Yes, then it will do what you want.
Use Get Queue Items with QueueName = “foo” and Reference = “bar.” You will get QueueItems as the output.
Use Assign to get a boolean whether the item already exists with the formula QueueOutput.Count = 1. If the queue’s references are unique, then Step 1 should return either 0 or 1 items.