Due to some issues within \ezcWorkflowNodeSubWorkflow it is not possible to pass variables from the parent workflow to a sub-workflow and vice versa.
There are three distinct problems:
- When a sub-workflow is resumed variables from the parent workflow are not mapped to the variables names in the sub-workflow (based on the variable mapping configuration):
zetacomponents/workflow/src/nodes/sub_workflow.php:166
- When the
waitingFor variables from the sub-workflow are being fed back to the parent workflow the names are again not mapped back to the variables names in the parent workflow (based on the variable mapping configuration): zetacomponents/workflow/src/nodes/sub_workflow.php:191-194
- The
\ezcWorkflowNodeSubWorkflow::passVariables() method does not check whether a variable exists in the from workflow resulting in an exception if a variable is mapped but not yet set on the from workflow.
I'll provide a pull request to fix these issues.