Uipath scenario based questions

Please Answer this question

Suppose 50 items got added in queue and once processed they are deleted or failed. Now if the dispatcher process is Re-executed how can we avoid duplicate records?

@Praveen_Reddy … Once the Item 50 item have been process they will be marked as “Success” Or “Failed”

If there is no Exception or Issue it will be Marked as “Success”
If there is some business exception or Application Exception then it will marked as “Failed”

Also, To avoid adding Duplicate value can we sorted-out many. Let me give one. While create queue you can mark the below option to avoid adding duplicate value into queue,

Check the Above Option while Creating Queue and add Reference to the item while adding it into Queue.

If you got solution from this post. Kindly mark it as Solution

Happy Learning !!

A solution I like to use (Solution from @Jayavignesh_G will also work, but you need to place the “Add Queue Item” activity inside a TryCatch, since if the item is duplicated, it throws a System Exception) is the following:

Before creating the queue item, Use a “Get Queue Items” activity, with the Filter “Reference” set to the Reference you will create:

image

If this outputs 1 or more items, then you know you’re about to create a duplicate, and you can skip it.

This solution allows the following:

  • You can decide if you want to only avoid duplicates, if for example, the same item is still as New, but if it was failed, then you can create it as new.
  • This is done by using the “QueueItemStates” filter from the same activity.

image

Example:

  • Reference - “Item1” is waiting on the queue with the Status “New”
  • We want to avoid creating it again, since it will be processed later on.
  • Set up the GetQueueItems as “New” on “QueueItemStates” property, and since it will give 1 match, you’ll skip the creation of the item.
  • If the item was failed or abandoned…, the “Get Queue Items” will not find it, therefore the bot will create it.
  • If we wanted to still skip it, just mark those options on the “QueueItemStates” property, and the bot will skip it.

Hope this helps!

Best Regards,
Ignasi Peiris