Skip to main content
Version: 1.15

Functions

Invocation

Invokes a built-in function ( e.g. contains()) or user-defined function by its name. The arguments of the function can be passed positional or named.

  • Positional: Only the values, in the same order as defined by the function (e.g. f(1,2)).
  • Named: The values with the argument name as prefix, in any order (e.g. f(a: 1, b: 2)).
contains("me@camunda.com", ".com")
// true

contains(string: "me@camunda.com", match: ".de")
// false

User-defined

function(a,b) e

Defines a function with a list of argument names, and an expression (i.e. the function body). When the function is invoked, it assigns the values to the arguments and evaluates the expression.

Within an expression, a function can be defined and invoked in a context.

{
age: function(birthday) (today() - birthday).years
}

External

Defines a function that calls a static Java method. The definition must include the full qualified class name and the method signature.

function(x,y) external { 
java: {
class: "java.lang.Math",
method signature: "max(int, int)"
}
}
Security

External functions are disabled by default. They would allow calling arbitrary code or accessing sensitive data. It is recommended to use the FunctionProvider API instead.