Invoke workflow doesn't work as expected

Good Morning,

I’m using the “invoke workflow” activity and I think that the “in” type variable do not work correctly

If I use an input string, set the value inside the invoke and then ask for the value outside, the variable is empty. This is normal, since the variable was input.

However, when I do the same thing with a dictionary, I can modify its value inside workflow and the changes are kept outside of the invoke

Sequence.xaml (9.3 KB)
Sequence1.xaml (6.4 KB)

I’m using Studio 2021.10.3

Thank you very much

I attach two files so that the behavior can be replicated

Sequence is the “Main” and Sequence1 is the invoked workflow

Hi @CTCJ ,

I’m not sure if I’ve understood your query correctly, but if you mark an argument an In/Out, then the it will assume the value that is present in the Parent calling it, before changing the value and sending it back to the parent.

If the argument is marked as In, it will only assume the value present in the Parent, but it won’t send anything back to the parent.

If the argument is marked as Out, it will not assume any value, but will send whatever value it holds back to the parent.

If you want your dictionary to retain the value it receives from the Parent, then you have to mark it as In.


That is usually how we treat the Config Dictionary in ReFramework.

I hope that clears things up for you?

Kind Regards,
Ashwin A.K

@CTCJ This is basically because the Dictionary is being passed as a Reference and not as a value. So whenever a Modification is being done to it, it is also reflected in the original dictionary.

Below post also discusses about the same problem faced :

Thank you vey much @supermanPunch. I think this is exactly what is happening

1 Like

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