- How to set a queue item only once when the bot restarts after a System Exception.
- How to set a queue item only once when you run the bot again.
Hi @minal.patil That means you don’t want to retry the queue items after a system exception occurs
if the queue item already exists in the queue then it should not be added again in both scenarios.
Not sure what you mean by “set a queue item only once”, but - if you use “Get Transaction Item” activity the moment it is gotten, it won’t process again.
If you mean something else, can you give an example of what you want to accomplish?
If you mean to but something into a queue, you can use the Add Transaction Item activity when catching the exception.
I think that it related to retry mechanism, you can use a reframework template for that and setup the retry numbers you want when you create a queue
I am use RE Framework. When i am run same BOT multiple times, If the queue item already exists in the queue then it should not be added again. How can I set in the code.
Hi @minal.patil ,
I believe you would need to set the Enable the Unique Reference Property while creating the queue.
Then add a Reference value while adding the item to Queue.
Based on this value the identification of the value is already present or not is done and the
Add Queue Item activity should throw an Error if it is already been added.
Another method would be to use
Get Queue Items activity and get all the queue items that is processed. Then compare those data with the data that you are trying to add to the Queue.
If the data is already present in the
Get Queue Items activity output, then you wouldn’t need to to add it to the Queue.
Hii @minal.patil ,
To do this You have to Enable the enforce Unique references while creating the queue.
Then let us say you have a data table to push into queue.Just add a new Column Named “references”
and add a Unique values to that column(if you have the unique columns in your datatable then uyou can take that column as a reference column)
Then while adding the queue items to the queue you can provide the column name here
Now if you go to your orchestrator, in the queue You can see there will be a reference column which is filled with the unique values which you added in your datatable while pushing the queue.
No need to worry about the added “reference” column in the datatable ,because the selected reference column will not be seen in the queue item it will bydefault set in the reference column of the queue .
This is one way how you can add unique references to the queue
Hope this might help you
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.