Often, a flow that contains a subflow must use variables and outputs from the subflow. For an overview of Data Variables, please see this article.
A simple method makes variables created within a subflow available to the master flow that it is part of.
This example flow has a subflow which has three variables internal to it.
Here is the subflow:
These are the variables that exist only within the subflow. They do not exist within the Master model:
To map the variables so that they are available outside the subflow, begin by right-clicking on the subflow and selecting Subflow Properties from the menu:
The Subflow Properties dialog box opens.
Select the Mapped Outputs tab.
Select the variables you want to use outside the subflow.
Then click on Map Variables
In the Test Data pane of the Master Model, the variables are automatically mapped to externally available variables.
TEST MODELLER BUILDING MODELS