How to implement a Query that allows us to reload items failed application automatically?


We want to implement a specific module that allows us to relaunch the items that end in Failed Application at the end of each process we execute.

For this we are exploring the way to launch an Update Query on the UiPath database, more specifically on the QueueItems table.

We have tried to change the status of the ReviewStatus field of the item from None (code in BBDD = 0) to Retried (code in BBDD = 3) but this option overwrites the status instead of transforming it.

Our desire is to be able to obtain the trace of the item and see the retries that have been applied to it:

Does anyone know how to solve this situation?Anyone who has implemented a module with the same functionality and who can contribute on how to develop a solution that allows us to automatically implement this process?

Thank you very much in advance ,

A greeting.

Hi @Yur

Could you explain a little your particular use case? The Failed status is mostly used to mark items that require manual intervention.

One way I can think of would be to try it like this, with the Get Queue Items activity:

I set it to return only failed items and only 1 of them (= effectively it’s a Get Transaction Item for failed items this way).

I am not sure if it meets all your requirements though.

1 Like


First of all, thank you very much for your interest in the question I raise.

I will try to explain myself again:

When we execute a process, we always retry all the items that end in Failed Application. Today this is an operation that we perform manually. For this we access Orchestrator and apply a series of filters on the view of the queues and View Transactions that allow us to select these items (Failed Application) and reload them in the queue.

When we do this manually, the item generates a trace with the different states in which its execution has ended. It can be seen on the screen:
The status failed corresponds to the first execution, the succesful with the retry

When we do it Updating the ReviewStatus column of the QueueItems table stays like this:

What would be the way to automatically replicate what we do today manually?

I hope I have explained myself properly.

In case of doubt, do not hesitate to ask.

Thank you.

I see the scenario now. Well, auto-retry on the Queue setting should take care of the ones that Failed with an Application exception. When you use Set Transaction Status to set the Failed-Aplication status on a queue item with auto-retry setup and when it still still has retries left, it will create a new queue item for you.

I would imagine it does not work like that for Business exceptions by design - those are supposed to be checked by someone before retrying.

Thus, if it is the question of retrying a Business-failed queue item, I would consider this a feature request (I think). I am not sure it can be currently done, probably because the automatic mechanism to link the queue items that are getting retried is not active for the Business-failed items.

I also searched our Orchestrator API and it doesn’t seem to have an end point for that. It is possible to change the review status, but not the retry.

1 Like