Invoke returns no argument if an exception was thrown


The problem is that when you get an exception inside an invoked file it doesn’t return any “Out” or “In\Out” arguments.

What happens:
I have an In\Out argument, say, myArgument. In the main workflow it’s set to “String.Empty”. When I pass it to another workflow file I assign a value to the argument, say, myArgument = “MyString”.
Then it should perform some actions in this workflow and then end. But if an exception occurs inside the workflow file, it doesn’t renew the myArgument value. It was “String.Empty” before, it is still “String.Empty” after.

Do you have any ideas how to handle it?


This thread might help you:

@loginerror Yeah I’ve already seen this topic. I thought there could be another solution :frowning: Thank you

Hi there,
I tested this in 2018.4.x with following result:

1/ in case the argument is one of primitive data types (e.g. string, int, etc.) the argument value is NOT returned from workflow in case of exception

2/ in case the argument is an abstract data type (e.g. JObject, dictionary, etc.) the argument value IS RETURNED from workflow in case of exception

Is this an expected result or just coincidence?