Import new queue items even if the queue is not empty in REFramework

Hi,

I’m not looking for a working solution, just for advice and make it to work on my own with your proposals if you have experience in this topic.

Here is the scenario.

  • On specific days of the month, the robot is adding new queue items.
  • 80% of the time before the new period for importing new queue items the robot has done the work.
  • These 20% of the time, the queue amount is so big, and if for example, today is the day for importing new queue items from the previous period, but the queue is NOT empty, so the robot is not getting new queue items.

The issue is coming from this part that in specific days is getting for specific previous time period documents to process. I can’t avoid it, because of strict business rules.

I must somehow manage to do it like this:
IF yesterday was the day for importing new queue items, BUT didn’t import, because the queue was not empty, today IMPORT the new queue items, even if the queue is still NOT empty.

Somehow to avoid the queue not being empty, but also an additional checker, if it was already imported. Because think like this, the queue items are imported, and the robot processes them fast, because of a small amount of queue items, and the robot is going to re-import the same queue items once again.

Sorry for the long post, didn’t manage to make it more simple, and thanks in advance for your proposals!

UiPath Studio:
image

If you have some way to uniquely identify the queue items, like file name, system id, etc., then you could use that for this purpose. For all queue items that you need to process, add the id to the “reference” field of the queue item

To make sure you don’t add duplicates, you can check the queue for existing transactions with the reference (id) by using “Get Queue Items” activity (add statuses as needed).

A good safety net is also to use the “enforce unique references” option of the queue:

.

Thank you very much for the proposal! Sound good and I will try to use your proposal in the current case.