Input/Output mapping is available to tasks, events and subprocesses (see the respective section of the docs 1). So, to answer your question: Yes, it can be used for a sub process.
<bpmn:subProcess id="SubProcess_0rctm1z" name="workorder process [for each product]">
<bpmn:extensionElements>
<camunda:in variables="all" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1crilbs</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0s3eioh</bpmn:outgoing>
<bpmn:multiInstanceLoopCharacteristics camunda:collection="products" camunda:elementVariable="woProduct" />
I’m using camunda:in variables=“all” but nor the subProcess nor by tasks in the sub process have the variables of my parent process. Only the variable over which is looped.
If I am not mistaken, you can just access the parent process variables from an embedded subprocess like normal. Use the delegateExecution.getVariable(…) and delegateExecution.setVariable(…) to read and pass variables between the subprocess and parent process. When you just want to set variables in the subprocess, use the delegateExecution.getVariableLocal(…) and delegateExecution.setVariableLocal(…) to just work with the vars on the subprocess scope level. Those are just visible inside the subprocess.
What you see in Cockpit above are the variables local to the subprocess, not the parent process variables.
Only Input mappings is supported for MULTI-INSTANCE CONSTRUCTS
NO OUTPUT MAPPING FOR MULTI-INSTANCE CONSTRUCTS
The engine does not support output mappings for multi-instance constructs. Every instance of the output mapping would overwrite the variables set by the previous instances and the final variable state would become hard to predict.