Global Exception Handler Behavior

Hi All!

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.

This is my configuration on the GEH.

@_pjflo

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

Cheers

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.

I’d appreciate your thoughts about this.

output.txt (265.9 KB)

Thank you!

@_pjflo

as per exception looks like there is a retry scope…

so for example if there is an activity A which failed…it retries 3 times from GEH

and say retry scope is 3…then 3*3 it would retry and then after if there is rethrow then 3 more

cheers

It was not in a retry scope. It is only on the process workflow of the REFramework.

@_pjflo

Is there a retry on the invoke process?

can you please share the workflow if you can

cheer

Here. I only created a REFramework project with a GEH in it. Then I just placed an activity on process workflow that should throw an error.

I was expecting that after three retries (considering that the queue retry is not enabled), it’ll go to the end state.

Test.zip (949.5 KB)

@_pjflo

Whta is happening is

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

This is how it is ending up so many retries

cheers

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.

@_pjflo

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

Cheers

Sorry, I don’t think I get that. Can you provide me an example? Thank you!

@_pjflo

  1. Add an asset …say use_geh
  2. Initially in the initialization state if first run set the value to true using set asset
  3. 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")
  4. On the else side of the if condition add a set asset activity and set use_geh value to false
  5. In the system exception catch block of process transaction add one more set asset activity and set the value of use_geh to true

Perform above steps and check the behaviour

Cheers

It works! Just exactly how I wanted it to be. Thanks a lot for your help, @Anil_G ! :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.