I have created a pretty complex flowchart that invokes a couple of other workflows (which also invokes other workflows). building this program I have used a lost of try catch activities to make sure things are getting done. but there are a lot of exceptions that cannot be foreseen, so I decided to include the global handler, now the problem is that the global handler is interfering with the “Catch” activities that are placed in the “Try Catch”
Yes, I am facing similar issue. The global exception handler interferes with the Try Catch exception handler resulting in undesirable outcome. My understanding was, when the exception is handled in Try-Catch, Global Exception handler will not be invoked. Bur it doesn’t seem to be working that way.
I have a global exception handler in the application, but call a workflow wrapped in a try catch.
Any exception inside the called workflow will bypass the except section of the try catch and go directly to the global.
I cannot imagine any circumstance when this would be correct or desired behavior, and it makes writing test cases all but impossible.
I would suggest that this behavior renders the global exception handler all but useless, when i had such high hopes for it when i first saw it. The idea is great, but this “bug” is terrible.
I have a similar behavior and I do not understand the behavior of the global exception handler. It is working the other way around. I thought it is the last interceptor because it comes out to the system but it is interfering as @Rasoul described. I was not expecting this.
I am also using a global exception handler and within this workflow I am using a try catch activity to firstly try to close the applications. If this does not work, the exception is catched and the processes are killed.
The problem is that the catch with System.Exception and KillAllProcesses is never triggered because of the GlobalExceptionHandler.xaml.
What is the suggested way to still use try catch blocks in combination with global exception handler? I copy and pasted some of the activities of the REFramework.
Hi, I had a similar Issue. My Try-Catch Activities worked well until I implemented the Global Exception Handler into my project. From this moment, every error (even those that came from the try-activities) automatically ran into the Global Exception Handler and not into the catch-block of the try catch activity. As I’ve learned now, the behaviour is the following:
If you use Global Exception Handler AND there is a Try-Catch Activity inside your Workflow, the Try-Catch-Activity will only do its job, as long as there is only one activity (no sequence!) inside the try-block.
In my example, I had a whole sequence insind the try block. This works, but as soon as you are using a global exception handler, it will not work any longer.
It seems to me that every single activity must be surrounded with try catch…
[quote=“slink, post:7, topic:145921”]
If you use Global Exception Handler AND there is a Try-Catch Activity inside your Workflow, the Try-Catch-Activity will only do its job, as long as there is only one activity (no sequence!) inside the try-block
[/quote] -Thanks for sharing this…
[quote=“slink, post:7, topic:145921”]
It seems to me that every single activity must be surrounded with try catch…
[/quote] - Looks like its the only way.
I dont know if enclosing each and every activity inside try-catch works but, just for test purpose I’ve put a single “Throw” in try-catch block and that invoked Global exception handler again.
Hallo,
I also have the same issue. If one can only use one activity and no sequence in the try block in combination with the global exception handler, the global exception handler makes no sense to me.
what I have seen is,
.
global handler is on first priority and the local handler (system. Exception)comes , we abort the execution after retry so it does not execute local handler,
if we give continue on the else part, the local handler executes.
Also put your activities in the try block inside a sequence .
Hello, was there ever a solution found for this? I am having the same issue - now that I have added a Global Handler, my Try-Catch exception is going to the global handler, instead of catching and moving on. Can someone help? Thanks!
We have same problem.
After implementing global handler all test cases and workflows maitained within same project are not working correctly, as we were using Try/Catch quite often.
Currently I don’t see any acceptable way around this issue.
As mentioned before, catching an exception inside Try/Catch should never route the process to Global Exception Handler. This is already “handled exception”. Issue could be a real blocker for many projects.