Skip to main content

Introduction

Template models are available in two different formats:

Freemarker templates

A freemarker templates allows to use Freemarker to generate text for various different places in Flowable. The template syntax makes it possible to use if conditions and loops with a simple formatting language.

The template normally produces a text or Markdown document as result.

Document templates

Typically used with the Generate Document Task in CMMN or BPMN allows to create a PDF or Word document. To create the template the Aspose template syntax is used.

The Flowable context is exposed with context.

A step-by-step guide can be found in the Generate Document reference.

Template variations

A template can define multiple variations. Each variation has its own content and a set of parameter values (for example country and language) that determine when that variation is used — for instance a different template for en than for de. Each variation is shown as a tab in the template editor, configured on the Variation and Variation parameters tabs.

A variation is identified by its variation key: the configured parameter values joined together (for example de_invoice), falling back to a parameter's default value when a variation does not set it.

2026.1.0+ Each variation must resolve to a unique variation key. If two variations produce the same key, validation reports a Duplicate template variation key error — otherwise they would generate colliding output. The variation tab is labelled with the variation key (instead of its position), so the variations stay identifiable when one is added or removed. Removing a variation asks for confirmation first.