I am developing an agent. I have main.flow and I declare all variables in main.flow. All router (logic gates) are also in main.flow so that all sub-workflows are invoked in main.flow. The problem is sub-workflows work in isolated contexts so that main.flow does not automatically recognize the variables worked on by sub-workflows.
When invoking a sub-workflow in main.flow, in the configuration tab, I can declare launch variables. When I go into the sub-workflow itself, in the Start block, I can also declare launch variables. So which is which? Do I need to declare launch variables when I invoked the sub-workflow, and also declare the same launch variables inside the Start block of the sub-workflow?
To add to this maintenance nightmare, in each sub-workflow, in the End block, you need to define the return data so that you can pass back the variables to main.flow. And then in the main.flow for that sub-workflow (in the configuration tab), there are output variables that you need to link the outputs of the sub-workflow back to the main.flow.
Why have 2 areas for defining launch variables and 2 areas for defining the return data? There is so much repetition when declaring these variables. What is the best practice here so my work does not become too unwieldy from monitoring all these variables.
Note: I am using the same variable names in main.flow and sub-workflows.
