How to add unique items in queue

I have used add queue item activity for adding items in queue and added unique references property which is helping me to keep unique items but there is one issue.

Even if we change queue items state to successful or failed or in progress, it considering that item is unique and not allowing me to add.

Can anybody help how can we check if item is unique and its state same time, if duplicate item is there then bot should check state if it is not new then ignore duplicacy and add that item.

1 Like

Hi @harshikakhatri269 ,

For this case, you would need to disable Unique Reference Property in the Queue.

A more handling would be needed to be done in the workflow. You could use Get Queue Items Activity with Filters Enabled for Certain required States only. Check in these queue items if there is a match between the new items to add, If a match is present you could skip the Adding of item to Queue else you could use Add Queue Item Activity and add it to Queue.

Let us know if you were able to perform this.

@supermanPunch
Thank you for your help.
If I’ll remove unique references then all the items will be added to queue.

Also, if we use get queue item before adding items into queue it will make those transaction states to in progress and then if we skip those items from addition then there will be different issues.

All the items won’t be processed correctly.

Do you have any other suggestions?

@harshikakhatri269 ,

That is not the case, Only if Get Transaction Item Activity is used the State changes to In-Progress.

Let us know if you were not able to use this activity or if you have found this after testing with Get Queue Items Activity.

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