Multi-instance call activtiy - input collection variable stored in each sub process

Dear all,

in my workflow I have a first task that generates a JSON array (name “scenes”). For each item in this variable I need to start a sub process (I make use of the call activity task with multi-instance marker). As inputCollection I have defined “= scenes” and input element is “scene”. See also screenshots below.

This works fine in general and I can access the variable scene in each sub process. Unfortunately also the variable scenes (JSON array) is copied to each sub process. The variable scenes can be a large list of items, thus it is not really recommended to store this in each sub process.

Is there a way to only send specific variables to the sub process started using the call activity task?

Thanks
Jonas

Combined screenshot from Operate with parent and sub process:

Hi @jeberle,

you can disable the propagateAllChildVariables attribute and provide an input mapping: Call activities | Camunda Platform 8

Hope this helps, Ingo

Hi @Ingo_Richtsmeier,

thanks for your response. propagateAllChildVariables was (I think automatically) set to Off using the Desktop Modeler. I deployed a new version of the workflow checking explicitely this setting (is set to false in the XML) - but the behaviour is the same.

This setting seems to be only relevant for the outputs (?) - at least in the modeler it is listed in the output section of the call activity task. In the modeler it states: “Only variables defined via output mappings will be propagated from the child to the parent process instance”. I need the other way around.

Best
Jonas

Hi @jeberle,

You are right, didn’t read the documentation close enough, as they state:

all variables of the call activity scope are copied to the created process instance.

Against my assumption, there is no mechanism to reduce the amount of variables in an inner scope, as all variables are visible on each inner scope.

On the other side, the called processes are new process instances, they can contain about 3MB of data for each instance, which is a huge JSON object: Variables | Camunda 8 Docs

Hope this helps, Ingo