I need some insights into the behavior of Global Handler. I am using it in a REFramework and noticed that if there is an error, it loops infinitely and keeps trying the workflow or activity that fails. I’d like it to proceed to the next step since I also have a try-catch that would handle the failure.
As perconfiguration it would not loop multiple times but when error is theown it would try 3 times and then the catch block will come into picture…if you are using a throw again in catch…again that would go to geh for 3 tiems and then the exception is thrown
That’s what I thought, too. I really find the behavior of my handler strange. I’ve attached here the error logs generated by the bot, I just added a log of the retry count, just to keep track. The activity that’s failing is not in a retry scope.
get clipboard 3 times
the sequence around it 3 times
the sequence around the inner sequence 3 times
invoke process 3 times
sequence around invoke 3 times
Ohhh, I see. But that’s quite a lot of retries. Specially for the UI Activities that I do have. Is there any other way to deal with this? I was hoping that I could use the global handler as back up to my UI Activities, that if those activities really fail for 3 times, it should go to end state.
Try to set a asset value in the geh and once continue comes in then set the asset to false or so and then in the geh first check asset if asset is false…dont retry…and change asset to true once it reaches the catch block
Initially in the initialization state if first run set the value to true using set asset
Now in the geh before if condition of choose behaviour use get asset and get use_geh and assign to say str…now in if condition use errorinfo.RetryCount<3 and str.Equals("true")
On the else side of the if condition add a set asset activity and set use_geh value to false
In the system exception catch block of process transaction add one more set asset activity and set the value of use_geh to true