Is there a way to hide process variables of the process instance from external task?

As I understand the Camunda documentation any Task has access to all process variables of a process instance. This seems unfortunate in case of external Tasks. Those tasks are handled by external processes, maybe implemented by other teams. It seems to me I loose all control of my internal state by exposing them.

Until now I found two workarounds:

  1. Hide variables with local variable of the same name. Very error prone and high maintenance.
  2. Encapsulate an external task by a Call Activity and have control over which (copies of) variables are passed in.

Thanks for any advice.

– Michał

Hi @mbazanski,

As per the docs,

Note that the variable values are the values that are visible in the scope hierarchy from the external task’s execution

so I can’t think of a better way than your findings.