I have a queue which contains thousands of input transactions. A lot of them will be Business Exception, which could be filtered from the Data Table, before I add them to the queue, however I need to store them in Queue with status BE.
Is there any possibility to bulk add items to the queue already with status BE?
Or simply, if I know the references, to set them as BE in one (bulk) step?
Or any other faster solution suggested? (Maybe with code?)
With a loop of Add Transaction item + Set Status around 800 items takes around 9 mins. That is simply too long time, because it is only 25% of the BusinessException items.
I think there is no way to do that. You have to do that in Loop.
With code it would be faster, but I have to idea how to do this with code and if it is possible.
Could you try following:
- Add bulk items added to the queue with reference set. Set reference accordingly for BE transactions(may be create a new column in excel sheet wherein value of column for BE transactions start with BE)
- Get queue items by filtering based on reference(starts with BE)
- This way you will only get queue items where reference starts with BE i.e. only BE transactions.
- Then run loop and set status for these BE transactions.
Hope this helps.
Thank you, Sonali,
with this I have the following problem: between 3 and 4 I need to get the queue item as Transaction Item one-by-one, to be able to set the status, and this is one additional step, which takes also time.
If I do not get the transaction item, I get the error: This queue item has not been processed yet. Error code: 1852
So with your suggestion: adding all items, then filtering the items from the queue (in 100 items packages, because that is the maximum), then looping on this list, and getting the items one-by-one as Transaction item to set the status In Progress, and then set the status one-by-one.
This seems to be even slower.
If you total 100 items and per your notes above, 25% are for BE txns, then you will only get 25 transactions(by using step 2 activity, no loop here).
Once you get these 25 txns, loop through these to set their status, this way you dont have to run through loop for 100 items to update status but just 25.
And in this part, loop is required, I am afraid there is no other way to do this part without loop.
Hi @sonaliaggarwal47 , Thnak you for your reply. Well the number of items is not around 100 but at least 800, and in the other inputs there will be more.
And the main problem is not to get the items in loop in 100s packages, because I have a solution on this already. The problem is that on th whole 800 items itemlist I have to go on one-by-one and get Transaction item, then set Transaction status.
With Get Transaction items activity I can get the new items, but that is not enough to st the status of them. (For this purpose will I need the get transaction Item.)
Try Bulk Add Queue Items instead of a loop and Add Queue Item.
A problem worth solving but I have hit a roadblock and may be you can take it forward.
I am assuming you are using a cloud orchestrator because looping and setting status in a on-premises orchestrator should not take that long (9 minutes).
I suggest this approach based on looping
But I have not passed the specific content and the item is set to In-Progress (which is a nightmare!)
As I said earlier this is the closest I can come to a solution for now. The item sets it to in-progress without its specific contents. The two things you will need to figure out is to
Find a way to get all your specific content and pass it to the Add Transaction Item as collection.
Use this thread to convert the in-progress item to new and your item will then have a Progress key with status “BE” - Why is there STILL no way to delete an In Progress Queue Item?! - Help - UiPath Community Forum
Here is the sample workflow (please try it on a dummy queue first) : SetProgressBE.xaml (10.2 KB)
There is another alternative that is to get the item data and build a new datatable with an additional column “Progress” and update its value to your required string “BE”. The loop hole here will be that some of your queue items will have this specific content and some wont (those which never had a BE) and your performer needs to handle this difference in a robust way.
About “Set Transaction Progress” activity
To others wondering why not just use “Set Transaction Progress” here?
Its because when the item is already set to Business or System exception, UiPath does not allow updating / Setting Transaction Progress to our liking. You will get an HTTP update error. It is logical because once an item is set as failed, it does make sense to allow updating that same item. Only In-Progress items can be updated with Set Transaction Progress activity.
Hope this sparks some ideas. Goodluck!
Thank you, @postwick, I’m using the bulk add Queue Items for the normal items, here 2500 items can be added in around seconds.
The problem occurs with the items which should be set as BE right at the beginning. Here, before I can set the BE status for the item, I need to add it to the queue somehow, and get as transaction item (this will set the status of the item as in prorgress, which is prerequisite of setting as BE)
So anyway, if I would add it with bulk, I would still need to get it as transaction one-by-one, and I would then set it as BE one-by-one. I have tried this as well. So maybe even less time to right add it to the queue as transaction item one-by-one and then set it as BE one-by-one, because then I save the time of bulk add and I can save the time of searching for the specific queue item to set as transaction item.
Only quicker way I can see is the bulk get transaction items and the bulk set status, or if would be a way with that I can bulk set status right from new to BE in one step.
Thanks for your answer @jeevith!
No, we are using on-premise Orchestrator. But we are talking about 2500 bulk add items (it is done in around 5 seconds) and next to this around 800 items has to be added one-by-one. (Maybe in prod mode it would be quicker, it would not make so many logs.)
What the bottleneck is, that before I can set the BE status for the item, it has to have the in progress status always, I cannot see any other way. And for having the in progress status, even I need to add the item one-by-one with the add transaction item, or I bulk add the items in a few seconds, then I need to use the get transaction item one-by-one, to set the in progress status. And afterwards, I still cannot see any other way so far to set the BE status, just setting it one-by-one.
So a lot of actions communicating with the orchestrator queue, and as I see, the optimization would be to decrease the number of this communication activities as less as possible.