Expressions in DMN
As shown in the decision table and reference, four types of expressions are supported:
- Input Entry: used to determine if a rule of the decisiontable is applicable
- Output Entry: returns a value which is added to the output of a matched ruleof the decision table
- Literal Expression: used to determine the value of a decision literal expression
You can read more on this in the DMN 1.1 reference. Inthe DMN 1.1 XML, expressions can be found in the XMLelements ,inputEntry
,outputEntry
andliteralExpression
:
Supported Expression Languages
The Camunda DMN engine supports two expression languages out of the box:
- FEEL: The Friendly Enough Expression Language of the standard.Note: FEEL is only supported for Input Entries in the Camunda DMNengine. See the reference for more information.
Depending on the JDK you use, there may also be a implementationavailable like or Nashhorn.
For example, to use as language for expressions add this dependencyto your project pom.xml
:
Default Expression Languages
The default expression languages of the different expression types in theDMN engine are as follows:
- Input Expression: JUEL
- Input Entry: FEEL
- Literal Expression: JUEL
The default language can be changed by setting it directly in the DMN 1.1 XML as global expression language with theexpressionLanguage
attribute ofthedefinitions
element:
Configuring the Expression Language
It is also possible to set the language for each expression individually using the attribute:
If you want to use another Java Unified Expression Language or FEELimplementation, you can replace the default implementations in the. This way you can also changethe JSR-223 script engine resolving, for example if you want to configurethe script engine before using it.