Since out_argument has to be a reference type, i.e array/datarow, etc. in case exception occurs at some point in the code, I am still not able to get the out_Argument out of the workflow where exception is.
out_Argument I am trying to extract from the workflow:
I would suggest to use Try catch in that workflow, and pass a out argument boolean in the catch block.
Check if the boolean is true (To check error) outside that workfow and use throw activity. In this case values will be updated. Make sure you’re throwing exception in main workflow.
Not surround, inside the workflow use Try catch and inside that you use your activities. So if any error occurs it will go to catch. In the catch block you can use string out argument (for example: errorMsg) and pass the error message.
Assign errorMsg = exception.Message.
Outside the workflow check String.isNullOrEmpty(errorMsg) and throw error if its false.
In this case your all argument values will remain.
Don’t use Boolean. String is better, so that you can pass error message.
Can you share your project - or at least the 2 workflows involved? I think you may be using the IN/OUT variables wrong. I know I was confused the first time, and I was using them backwards.
The reason I ask, is b/c you do not need a global argument in the calling workflow for the OUT variable - only in the called - and I’m not sure which workflow each of these screenshots is from.