cancel
Showing results for 
Search instead for 
Did you mean: 

Work Queues

GavinRudling
Level 7
Good Day Team,
I would like to know if there is a way to remove an item from the queue when a duplicate is detected.
So I want to remove the item that is already in the queue when the Key is identified to already be in the queue.
Any ideas?

Kind Regards
Gavin

------------------------------
Gavin Rudling
Digital Consultant & Developer
Cog3nt
Africa/Johannesburg
0813906789
------------------------------
1 BEST ANSWER

Best Answers

John__Carter
Staff
Staff
Yep it's do-able Gavin, you need the ID of the item you want rid of and then use the Delete Item action. If the duplicate is pending, you'll need to use Get Next Item to lock it, mark it complete (or exception), then delete it. To be thorough, you'd probably want to do this:

  • Get Exception Items using Key Filter, loop through resulting item IDs and delete each one
  • Get Completed Items using Key Filter, loop through resulting item IDs and delete each one
  • Get Next Item with Key Filter, Mark Complete, Delete, repeat until there are no more items with that key
If the duplicate is locked by another DW, then you won't be able to delete it until it's released.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

View answer in original post

3 REPLIES 3

PabloSarabia
Level 11
Hi @GavinRudling

For removing items from the Queue is easy, use the Action "Delete Item" from the "Work Queues" Object.

To check if exists any duplicate item, you can ask first if exists the key that you want to insert before insert it. Use the Action "Is Item in the Queue" from the same VBO. 

This action gives you the posibility to filter one Work Queue with different parameters, and returns a flag and a collection with all the item ids that meet the criteria.

You can make something like this:

19924.png
Hope this helps you!!

See you in the community, bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

John__Carter
Staff
Staff
Yep it's do-able Gavin, you need the ID of the item you want rid of and then use the Delete Item action. If the duplicate is pending, you'll need to use Get Next Item to lock it, mark it complete (or exception), then delete it. To be thorough, you'd probably want to do this:

  • Get Exception Items using Key Filter, loop through resulting item IDs and delete each one
  • Get Completed Items using Key Filter, loop through resulting item IDs and delete each one
  • Get Next Item with Key Filter, Mark Complete, Delete, repeat until there are no more items with that key
If the duplicate is locked by another DW, then you won't be able to delete it until it's released.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Hi John, Thanks for the advice. Much appreciated.

 

Regards

Gavin