Properties elements shared for all of the elements in the process

Hi Experts,

I need to provide in the Modeler a way to manipulate properties that are similar to process instance variables. These properties are not desired to be defined with Java because I would like a user to dynamically define them BEFORE the Modeler will get called. Can I define somehow a properties of the elements that got shared between all of the elements? Ideally I would like to have process variables that can be used at the level of Modeler… but without involving Java.

Any advice on this?

Thanks,
Val.

Hi Val,

If I understand correctly you would like to add process variables to a process model in modeler in a somewhat templated fashion and without Java code.

Ideally I would like to have process variables that can be used at the level of Modeler… but without involving Java.

You have a few options for this -

  1. Use an expression to add variables via a service task. See Expression Language | docs.camunda.org

  2. You can use a script task to set variables into execution context note that Javascript works out of the box. See Scripting | docs.camunda.org

    execution.setVariable("intent", "Intent");

  3. Another option which is slightly more advanced would be to use an Element Template. You can use the Element Template to extend the properties panel and add variables to the process. See https://github.com/camunda/camunda-modeler/tree/master/docs/element-templates

Hope that helps
Cheers

1 Like

Thanks a lot for your answer!!