cancel
Showing results for 
Search instead for 
Did you mean: 

Default variable to store attempt count of queue record

ShimaDaisuke
Level 3
Hi, I would like to create a process to perform different actions based on attempt count of the record. (ie. perform action "A" when the record is processed for the first time and perform different action "B" when the record was processed for the second time or more.) Is there any default variable which stores the attempt count of the queue entry?
4 REPLIES 4

VijayDodamani
Level 5
Hi, There is default variable used for Attempts, but that is related to : if any queue item is failed to completed or got exception then it will retry for no of time for which Attempts has been configured in workqueue, by default value is 1.   Once any queue item is successfully completed then, BOT is not going to pick it twice. What I understood from your problem statement is :   You might have different module to work on and if Module A has been successfully completed and got exception while executing Module B at that point of time you need to increment your Attempts while creation of the queue.   Once the Module A completes, you can add a tag saying ""Module A Completed"". Now while coming to the same request you just get the tag values and from there you can start directly Module B.   There is one process example is available. I am attaching the screen shot from there.   NOTE: Once the queue item successfully executed it cannot be run again.

DaveMorris
Level 14
Hi dshima, In addition to using the tag, as Vijay says, you can also use the Status field. The difference is that the Status field can only contain one value at a time and users can edit the Status value from Control Room. So which field to use depends on your use case. Respectfully, Dave
Dave Morris 3Ci at Southern Company Atlanta, GA

ShimaDaisuke
Level 3
Hi Vijay, Dave, Thank you for your quick response. My explanation may not be clear enough so let me add some explanation. 1. I have already increased the Max attempt count in queue setting and letting Blueprism automatically rerun the record if there are any exception happened. 2. As I attached the sample image of the process, what I would like to do is to switch the process within a process, based on the attempt count. So as you can see in the image, I would like to let the process judge if the queue record under processing is ran for the first time or not. Therefore, I wanted to know if there are any solution to obtain the attempt count value of the queue record. Or does the tag or status value in your responses still work in above purpose?

ShimaDaisuke
Level 3
Vijay, Dave, I found that there are  ""Attempts"" in ""Get Item Data"" for ""Work Queues"" object. Seems this would be the value which I was looking for. I can check this value and switch the process based on this value.