Howto set source and target in element template

Hi experts,

I would like to get two strings from the user and put them into a single output mapping for zeebe.

The UI should look like this:

And the mapping in the BPMN file should look like this:

          <zeebe:output source="=84600" target="BBRV" />

where source gets the value of Formel and target gets the value of Variable.

How should the properties (especially the binding) look like for this element template?

Cheers, Ingo

So Formel is “input variable name” and Variable is “output variable name”? Pointer indirect?


Hi @jwulf,

no, it is just a single output mapping, where the Formel may contain an extisting process variable muliplied or dived by something.

And Variable is the target for the output mapping, i.e. the process variable where it has to be stored.

Another example:

In the examples for element templates there are only static values for the process variable name. My question is: Could both be set by the element template from an user input? If yes, how?

Cheers, Ingo

I think you would need to do two steps…

Input Variable (Formula to Execute): Formel from first example, or “VBEZ*12/100” from second
Output Variable (Variable to Set): BBRV from first example, or ZVBEZJ from second

Then your template would need to call an evaluate on the Input Variable as part of your worker/function.

In theory, the resulting code would be more like:

          <zeebe:input source="=84600" target="temporaryVariable" />
          <zeebe:output source="temporaryVariable" target="BBRV" />

Hi @GotnOGuts,

thank you for your suggestion. Right now I have modeled 26 process models with around 10 of these operations per model. Doubleing the mappings just to use a template is not a good improvement.

A better idea is to hide the type definition of the service task and provide a single output mapping dialogue as it is.

Would this be possible, modeler team?

Cheers, Ingo

I would have expected that once you’ve created your template, you then have only your two fields to fill in on the model: The formula to evaluate and the variable to set.

Based on the documentation, it should give pretty much exactly what you showed on your screenshot.

But… it’s likely that I’ve misunderstood…

Hi @GotnOGuts,

No, I don’t think so. Your suggestion is valid!

My only concern is that it is more complicated to maintain the bpmn diagrams without the element template if I distribute the data on two elements in bpmn file.

So I would like to have a single element generated from a customized user interface.

Maybe I’m stubborn here :wink:

Cheers, Ingo

@Ingo_Richtsmeier I believe you hit a limitation here.

The goal of element templates is to establish predictable input and output mappings. What you’re proposing here (I believe) is to establish dynamic mappings. @GotnOGuts showcased a functioning workaround.

Hi @nikku,

thank you for confirming.

Is it be possible to add a single output mapping section as it is into an element template?

This section Defining templates | Camunda Platform 8 Docs is just talking about Camunda 7 mappings?

Cheers, Ingo

Is it be possible to add a single output mapping section as it is into an element template?


In C7 we had such behavior but with C8 “modeling in re-usable building blocks” we’re inclined to not add it. Please open an issue in the Camunda Modeler, clearly outline your use-case, why the workaround is not feasible, and we can follow-up.