cancel
Showing results for 
Search instead for 
Did you mean: 

Retry Loop

SamLima
Level 7
Does the Retry Loop reduce the chance a Work Queue item will be successfully worked when considering one-off application errors?


------------------------------
Sam Lima
------------------------------
1 BEST ANSWER

Helpful Answers

Hi Sam,

It ultimately drills down to what kind of an application issue is really happening which can determine if a retry loop can reduce the chances of an error or not. Let me give you an interesting example to understand this.

Let say, I have an application for generating a quote number like BP Travels application which you must have come across by now. We will take three different type of application errors that we can get within that application. First type is let say, while filling up the fields of the quote the network response was so slow that by mistake a field or two got missed to be filled up which were mandate in nature and it tried to click on submit quote button, then the application might throw an error popup saying that not all mandatory fields have been filled up properly. In such a case, if we handle the error and retry it by refreshing the page and again start filling all the field items, our automation might succeed in the second attempt. Such an application error can surely be fixed up while retrying and hence the chances of a successful run increases.

Now, let us come up to a second type of an error in the same application screen. For some reason let say the data received the bot for To and From date is in 'dd/MM/yyyy' format but the application takes the data format in 'MM/dd/yyyy' format. Then once the bot fills up this field and tries to submit it again an error popup might be thrown by the application stating that such date formats are not allowed. While we can think of retrying and again filling up the data but what is the use if every time the format is going to remain the same. Such a case wont do us any good if it is retried at all. The solution here lies with discussing with business if the data format is always going to be coming in the proper format or not and even before entering into the application if we can perform data validation and formatting checks, we should be flagging such anomalies as Business Exception instead and move ahead with the next case while business rectifies the data. 

Now, let us come into a third type of scenario where let say while the bot tries to enter the quote generation screen an error webpage pops up saying the website is not reachable. It may happen due to some downtime issue or an issue with the application server. Now, while trying to get into the website we can try for couple of times if the website is up by that time then it's great but if it is not then again there is no point of marking all our cases as exception and wasting like all those resources. Imagine if you have 100 cases in your queue, marking all of them as exception with the same error description website not available is not a logical solution as you would again need to add all those 100 items back once the website is up. Better solution is implement a consecutive exception check if three times such error happens for three different work items one after another, we stop the bot and send a critical exception email. At the same time we can add those failed items to a separate queue called as maybe 'Downtime Queue' and in our logic we can always check first if there are any items in Downtime Queue or not. If yes we work them first and then work the rest of the items in original queue. 

So like I showed you three errors came from the same application but every time retrying may not be the best approach so it all is going to drill down to the nature of error and how it should be handled by the end of the day.

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

2 REPLIES 2

Hi Sam,

It ultimately drills down to what kind of an application issue is really happening which can determine if a retry loop can reduce the chances of an error or not. Let me give you an interesting example to understand this.

Let say, I have an application for generating a quote number like BP Travels application which you must have come across by now. We will take three different type of application errors that we can get within that application. First type is let say, while filling up the fields of the quote the network response was so slow that by mistake a field or two got missed to be filled up which were mandate in nature and it tried to click on submit quote button, then the application might throw an error popup saying that not all mandatory fields have been filled up properly. In such a case, if we handle the error and retry it by refreshing the page and again start filling all the field items, our automation might succeed in the second attempt. Such an application error can surely be fixed up while retrying and hence the chances of a successful run increases.

Now, let us come up to a second type of an error in the same application screen. For some reason let say the data received the bot for To and From date is in 'dd/MM/yyyy' format but the application takes the data format in 'MM/dd/yyyy' format. Then once the bot fills up this field and tries to submit it again an error popup might be thrown by the application stating that such date formats are not allowed. While we can think of retrying and again filling up the data but what is the use if every time the format is going to remain the same. Such a case wont do us any good if it is retried at all. The solution here lies with discussing with business if the data format is always going to be coming in the proper format or not and even before entering into the application if we can perform data validation and formatting checks, we should be flagging such anomalies as Business Exception instead and move ahead with the next case while business rectifies the data. 

Now, let us come into a third type of scenario where let say while the bot tries to enter the quote generation screen an error webpage pops up saying the website is not reachable. It may happen due to some downtime issue or an issue with the application server. Now, while trying to get into the website we can try for couple of times if the website is up by that time then it's great but if it is not then again there is no point of marking all our cases as exception and wasting like all those resources. Imagine if you have 100 cases in your queue, marking all of them as exception with the same error description website not available is not a logical solution as you would again need to add all those 100 items back once the website is up. Better solution is implement a consecutive exception check if three times such error happens for three different work items one after another, we stop the bot and send a critical exception email. At the same time we can add those failed items to a separate queue called as maybe 'Downtime Queue' and in our logic we can always check first if there are any items in Downtime Queue or not. If yes we work them first and then work the rest of the items in original queue. 

So like I showed you three errors came from the same application but every time retrying may not be the best approach so it all is going to drill down to the nature of error and how it should be handled by the end of the day.

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Thank you so much @Devneet Mohanty, you are a savior!


------------------------------
Sam Lima
------------------------------