Map process variables

Hello,

I have a process with different tasks, and those tasks work on a specific object instance passed by a process variable. Now I want to expand this process, and work on multiple instances, but I do not want to adapt my tasks to be aware of that. They should still only work on the one process variable they know.
I could do this by putting the tasks in a Call Activity, so I could map the correct instance variable to the variable my task works on, but I do not think that a Call Activity would be the right approach here. I also do not want to do the mapping in a separate Java Task, I want this to be visible from modeler perspective.
Best approach in my opinion would be to be able to map process variables for tasks or at least sub tasks, but I did not find this option.

Best regards,
Daniel

Sounds like it might a good idea to use an embedded sub process which is marked as a multi-instance. Each instance would would have it’s own local version of a given variable while still being part of the same process.

Hi Niall, thanks for your quick reply.
sub process would be ok for me, but I did not find a way to map my process variables. As I said, I would need two sequential calls to this sub process. For the first call I would need to map process variable A to process variable X, for the second call process variable B. In a CallActivity, I can do this with the option Variables -> In/Out Mapping. I did not find this option anywhere else.