When an instance arrives to a Subflow activity the Process Execution Engine creates an instance in the process associated to the Subflow activity.
If the subprocess requires input arguments, the Engine uses the argument mapping of the Subflow to assign them values.
Then the instance created in the subprocess flows through it.
When the instance reaches the End of the subprocess, the subprocess notifies the Subflow activity. When the Subflow activity receives the notification, it assigns the output arguments of the subprocess to the process instance variables using the defined argument mapping.