How can I rollback the Bulk inserted queue Item from Queue

HI @RajuB,

When best to use Bulk Add to Queue?

  • When you know you have a datatable validated for all its Items.
  • When you want minimal number of calls to your Orchestrator from Robot

In your case, I would suggest using a normal Add to Queue but before that you can validate your data going to the queue and if the data going to the queue is not as expected, then an If condition does nothing. If Data is validated as true then Add To Queue. This however, will mean that you need a for loop.

But if you feel your architecture is good then you can try deleting queue items as suggested here: Why is there STILL no way to delete an In Progress Queue Item?! - Build - UiPath Community Forum In your case these will probably just be with status “New”.
Adaptation of this logic can be used in the Catch block but I would also suggest having a check that you are setting the status for the correct Transaction Item in Queue1.

Some final thoughts: Would an unique ID be a helpful thing to have as an item in Queue 1? This way you can look for the correct item in Queue1 before setting the transaction status?

Do post you final approach here, I am quite interested in learning what works in such a scenario.

3 Likes