Rethrow Exception Flags issue

Working through an exception handling scenario, we identify an unexpected and unwanted behavior of the ‘Rethrow’ exception function.

Seems after ‘setting’ the return values before an exception, normally flags that we will use to reclassify our exception by the client component; the ‘rethrow’ returns our output values to their original values.

I have attached an example for ‘String’ and ‘Boolean’ for your own analysis.

Enjoy them!
AccessingExceptionValues.zip (22.2 KB)

I found this behavior also. It is not nice especially in case you want to get more details about the exception in the calling WF.
BUT it is valid for primitive data types only.

If you use In/Out argumet of some complex type - e.g. Json object or dictionary - it retains the change you make before exception is fired.

A sample scenario:
exception.zip (5.6 KB)

Cheers