In community distributions of Camunda BPM, the following template engine is provided out of thebox:

  • FreeMarker
    The following template engine is provided as optional add-on:


  • The script engine wrapper implementations can be found in thecamunda-template-engines repository.

Additionally, the following template engine is supported as enterprise extension:

  • Install a Template Engine

A template engine must be installed in the same way as a script engine. This means that the templateengine must be added to the process engine classpath.

When using an embedded process engine, the template engine libraries must be added to theapplication deployment. When using the process engine in a maven project, the template enginedependencies must be added as dependencies to the maven pom.xml file:

Please import the Camunda BOM to ensure correct versions for every Camunda project.

is pre-installed in the Camunda pre-packaged distribution.

Use a Template Engine

If the template engine library is in the classpath, you can use templates everywhere in the BPMNprocess where you can use scripts, for example as a script task or inputOutput mapping.The FreeMarker template engine is part of the Camunda BPM distribution.

Inside the template, all process variables of the BPMN element scope are available. Thetemplate can also be loaded from an external resource as described in the .

The following example shows a FreeMarker template, of which the result is saved in the process variable.

In an inputOutput mapping it can be very useful to use an external template to generate thepayload of a camunda:connector.

Use XSLT as Template Engine

Please note that this feature is only included in the enterprise edition of the Camunda BPM platform, it is not available in the community edition.

Check the Camunda enterprise homepage for more information or get your

Instructions on how to install the template engine can be found inside the downloaded distribution.

When using an embedded process engine, the XSLT template engine library must be added to theapplication deployment. When using the process engine in a maven war project, the template enginedependency must be added as dependencies to the maven file:

Please import the Camunda BOM to ensure correct versions for every Camunda project.

The following is an example of a BPMN ScriptTask used to execute an XSLT Template:

As shown in the example above, the XSL source file can be referenced using the camunda:resourceattribute. It may be loaded from the classpath or the deployment (database) in the same way asdescribed for .

The result of the transformation can be mapped to a variable using the camunda:resultVariableattribute.

Finally, the input of the transformation must be mapped using the special variable using a <camunda:inputParameter … /> mapping.