junzhigoh
(Junzhigoh)
April 15, 2021, 3:30am
1
Hi all,
I’m looking for a way to set the number of retries = 0 for the global exception handler.
I have tried the below methods but it is still retrying:
Even by setting retry criteria to retrycount < 1,
Assigning retrycount = 100 to immediately exceed the limit
Setting both actions in the ‘If’ activity to errorinfo.Continue
The purpose of my global handler is to trigger a python script to run once it fails, I don’t need to retry the failed activity. Is this possible?
Hi @junzhigoh , Welcome back to UiPath Community!
Can you check the config file inside the project folder? In the Constants tab of config file check the value of max retry number.
Hope that might help you.
Best,
Robin
junzhigoh
(Junzhigoh)
April 15, 2021, 8:53am
4
Hi Robin, where do I find the config file? mine just looks like this, inside the
.tmh folder > config.json
junzhigoh
(Junzhigoh)
April 15, 2021, 8:53am
5
Hi Surya,
Thanks for your reply. This method still caused 3 retries to occur
@junzhigoh inside the project folder you would find data folder. Inside data folder you can find the config.xlsx file of that project.
I didn’t get any retries in my project. I don’t know what’s going wrong with your project. Is it possible for you to share your project files?
junzhigoh
(Junzhigoh)
April 21, 2021, 3:53am
8
Hi @AKM_Robinuzzaman , I only see these 4 folders in the project folder!
junzhigoh
(Junzhigoh)
April 21, 2021, 4:09am
9
Sample workflow.zip (5.2 KB)
Hi @Surya_Narayana_Korivipadu , I have attached a sample workflow that throws an error and then is still being re-tried by the global handler.
Thank you for the replies!
1 Like
There’s a mistake in your global exception handler
Refer my previous post
you should use result = ErrorAction.Abort in the Then block of if condition, there’s no need to put any activity in the else block
Also I suggest you to right click on your SampleWorkflow and then click on “Set as main”
junzhigoh
(Junzhigoh)
April 22, 2021, 2:14am
11
Thank you @Surya_Narayana_Korivipadu , it works well now!
To understand better, was the main issue with my workflow setting result = ErrorAction.Continue that is causing the global handler to retry?
I realised when I set the RetryCount to be < 5, the handler will retry up to 8 times, does it mean using ErrorAction.Continue will cause it to retry 3 times minimum?
1 Like
Yes. You’ve set result = ErrorAction.Continue. That’s the main issue.
I’m not sure why it retried 8 times. ErrorAction.Continue just throws the error once again, it will not retry 3 times. Instead of using your own variable Retry_Count, try giving errorInfo.RetryCount < 5 in the condition
system
(system)
Closed
April 25, 2021, 6:56am
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.