Is there a way to hide process variables from subProcess?

We would like to only expose local variables defined for a subProcess (defined by input parameters or multiInstanceLoopCharacteristics elementVariable) to tasks within the subProcess. We only expose local variables to our external tasks by specifying the localVariables=“true” topic in our fetchAndLock REST request (and specifying localVariables with our complete REST request). We only expose local variables to our callActivity elements by specifying <camunda:in local=“true” variables=“all” /> and <camunda:out local=“true” variables=“all” />. We would like to do this with subProcess elements too. Is there a way to only make local variables available to activities within a subProcess?

I did have hope that specifying <camunda:in local=“true” variables=“all” /> and <camunda:out local=“true” variables=“all” /> within the subProcess might work… it did not (although perhaps adding support for that might be a way to satisfy this use case?)

Hello @bobottawa ,

if you use the camunda:in tag, I am sure that you mean the CallActivity. There, it is possible to explicitely map variables in and out by using the Mapping in the Variable panel of the properties.

The local variables that you describe need to ne mapped into and out of the scope of a task by the Input/Output Panel for every task. By this, you can exactly specify which variables are available in the local scope of each task.