I have a try catch for an invole workflow MainProcess.
MainProcess has two invoke workflows SubProcess1 and SubProcess2
In the workflows SubProcess1 and SubProcess2 I have enclosed in try catch.
If there is an exception in Sub Process1 or SubProcess2 I am catching it and sending it over in Invoke workflow argument to MainProcess.
Since Main Process has its own try catch, when an error happens in SubProcess1 or SubProcess2 it is not being detected. It is being caught and process continuing.
What do I have to do if SubProcess1 or SubProcess2 fails, Main Process has to detect that.
Shall I be using the sent exception argument from sub process to mainprocess in some way so I can detect the error?
So, whenever an exception is thrown it throws an error and the error is caught in the immediate catch, if you wanna propogate the error upwards you need to use a Rethrow Activity.
Wherever your first catch is inside that catch block use a rethrow activity.