Arguments between workflows


I am trying to use arguments to transfer variables between workflows. But im having some difficulties.
Can someone please explain this to me with an example?

Here is an example of the workflow:
Sequence 1 tests if StrReference equals OK. If yes, display “OK” in text box. If not, then go to sequence 2.
Sequence 2 has invoked workflow 2
Workflow 2 has invoked workflow 3
Workflow 3 has an assign activity that Assigns “OK” to StrReference
Now the flow should return to the initial sequence 1 for the test (if StrReference equals OK)

Can someone help in determining the arguments and logic?
Maybe build the example for me? (23.1 KB)

Br Karsten

Hi @Karsten_Bertelsen :wave:

I suppose you are confused with the direction of passing the argument? Kindly go through the docs:

Hi @monsieurrahul,
Thanks for the suggestion.

If its is required to use the “Invoke Workflow File” to import an argument into a workflow, how does one extract an argument from the “Invoke Workflow File” into the primary workflow?

BR Karsten

Hey @Karsten_Bertelsen, here are some pictures to help you understand:

Sample Workflow 1, having an variable saying “Hello BR Karsten”:

Sample Workflow 2, having a message box to print the value stored in the previous workflow:

Main workflow invoking both the workflows:

A variable in the primary workflow (Main.xaml), receiving the output argument from Sample Workflow 1. Note it’s direction, naming convention as they matter a lot.

The same variable is being fed as the input to Sample Workflow 2, where it is being consumed by the text box (in our case):

And when I run this:

That’s it! Hope this helps! Do let me know if you are facing any issues!


1 Like

Thank you very much @monsieurrahul, you helped me out.
Appreciate your effort! :slight_smile:

1 Like

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