I am curious how to import and export a variable from one process to another.
Imagine this, I have two processes, one called “main” and another called “process1”. In my main I have a simple string called myText “This is a text from main”, how do I import that into “process1” and save it to a variable in “process1” such that the string is being executed inside process1?
Now, also imagine I have another variable in “process1”, an integer, myInt, with the value “69”, how do I export that variable to “main” and save it in a variable such that I in main can print it like “myInt.ToString”?
Important information, I ONLY want to use ONE invoke workflowprocess, and that has to be in “main”. So “main” invokes “process1” and not the other way around. “process1” should not have an invoke workflow activity.
Below is two screenshots which shows my attempt of dealing with this dilemma:
Click on the invoke arguments and then you will be able to see the in_myText in the popup and then in the right side you will be able to see the blank cell and then enter the myText variable in that row and that’s it close the popup and save the workflow. In this way you can assign the variables and the arguments.
You need to create and argument in the process xaml and keep the argument type as out and save the workflow and now access the main xaml and click on the invoke and assign the myint argument to myint variable in the main xaml and then you can get the value from process xaml to main xaml. keep a message box in the main xaml as shown below and print the int value in the main xaml.