Skip to main content
Version: 8.4

Expressions

Expressions can be used to access variables and calculate values dynamically.

This is particularly useful when automating a process using BPMN and orchestrating human tasks.

Some attributes of BPMN elements require an expression, for example, a sequence flow condition on an exclusive gateway. Other attributes can define an expression optionally as an alternative to a static value, for example, a timer definition of a timer catch event.

Expressions vs. static values

Some attributes of BPMN elements, like the timer definition of a timer catch event, can be defined in one of two ways:

  • As an expression (e.g. = remainingTime)
  • As a static value (e.g. PT2H)

Expressions always start with an equals sign (=). For example, = order.amount > 100. The text following the equal sign is the actual expression. For example, order.amount > 100 checks if the amount of the order is greater than 100.

If the element does not start with the prefix, it is used as a static value. A static value is used either as a string (e.g. job type) or as a number (e.g. job retries). A string value must not be enclosed in quotes.

note

An expression can also define a static value by using literals (e.g. = "foo", = 21, = true, = [1,2,3], = {x: 22}, etc.)

The expression language

An expression is written in Friendly Enough Expression Language (FEEL). FEEL is part of the OMG's Decision Model and Notation (DMN) specification. It is designed to have the following properties:

  • Free of side effects
  • Simple data model with JSON-like object types: numbers, dates, strings, lists, and contexts
  • Syntax designed for business professionals and developers
  • Three-valued logic (true, false, null)

Camunda 8 integrates the FEEL Scala engine to evaluate FEEL expressions.

Next steps

Read more about FEEL expressions and how to use them on the following pages: