Handle exception in son workflow from father workflow

Hi everyone!

I’m having problems with the way I want to handle an exception in a workflow I have been practicing.
The exception is handled using a Try-Catch but it is thrown in a workflow invoked in a for-each, inside another workflow.

If I want to handle the exception thrown in “son” in the “father”, is there a way to do it? Has the “Rethrow” activity something to do with it? If so, can someone help me understand how can it be done by using Rethrow

As an attachment, there is an example of those workflows.

Thanks in advance and cheers!

Exception_Test.zip
(The message box in “Then” has no purpose)

Hi,
What is your intended purpose when you catch an exception in Son because at the moment, you are handling it in Son.? Are you asking if you want to catch it outside of Son?

1 Like

@Maria_Nolan Yup, I want to throw in son and handle in father, that is the problem

Hi @Daniele_Bossi

Please create an argument of IN/OUT of type Exception Object in SON workflow.

In case of any exception in the SON workflow, set the exception object in the catch block.

In the FATHER workflow, check if exception object is set (if NOT exceptionobject is Nothing) then decide how to follow up the remaining process.

Regards,
Karthik Byggari

1 Like

@KarthikByggari Thanks, gonna try right now

Simply remove the try catch in son and surround father in a try catch. Any exception found in son will go to the father Catch.

@Maria_Nolan I tried but it doesn’t work if (for example) I have to pass the exception between more than once (as in father-son-grandchild workflows)

@KarthikByggari’s solution worked! Thanks a lot!

1 Like

ah ok got ya. Glad you found a solution.

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