FEEL
In Case Modeler, datatypes and data mapping expressions use the language defined by the DMN standard called "FEEL", which stands for “Friendly Enough Expression Language”.
FEEL is a Low-Code expression language used in the boxed expression cells. As an expression language, FEEL just calculates an output value based on input values. It does not take any actions. FEEL expressions are based on a combination of built-in FEEL functions and operators, custom FEEL functions, user-defined functions (BKMs and decision services).
On the Trisotech platform, FEEL is used not only by DMN but BPMN and CMMN as well. Every revision to the DMN specification typically provides some enhancements to FEEL, so some expressions are DMN version-dependent.
FEEL also offers an alternative dialect named B-FEEL (Business Friendly Enough Expression Language) which shares the same grammar as FEEL but alters the semantics to be friendlier and more intuitive toward non-IT users.
Expression Legend
Operation
Expression |
Description |
Example |
+ |
Addition |
10+20 |
- |
Subtraction |
20-10 |
/ |
Division |
20/10 |
* |
Multiplication |
10*20 |
** |
To the power of |
10**3 means 10^3 |
Input test
Expression |
Description |
Example |
value |
Equals to value |
=4 means equals 4 |
>value |
Greater than value |
>10 |
>=value |
Greater or equals to value |
>=20 |
<value |
Smaller than value |
<10 |
⇐value |
Smaller or equals to value |
⇐20 |
[Value1..Value2] |
Close interval, between Value1 and Value2 inclusive |
[10..20] means >=10 and ⇐20 |
(Value1..Value2) |
Open interval, between Value1 and Value2 exclusive (ex.: (10..20) means >10 and <20) |
(10..20) means >10 and <20 |
[Value1..Value2) |
Interval, >=Value1 and <Value2 |
[10..20) means >=10 and <20 |
(Value1..Value2] |
Interval, >Value1 and ⇐Value2 |
(10..20] means >10 and ⇐20 |
not(value) |
Is not val. Works on all types |
not("Student") will be true if the input is anything but "Student". |
[Value1,Value2] |
Works as an "or". Works for numbers as well. |
["Student","Teacher"] means" Student" or "Teacher" |
A dash "-" symbol can represent any value.
FEEL Data Types
The types below can be combined with the expressions above to create advanced expression in the decision logic.
Days and Time Duration
Types |
Description |
Example |
duration("PnDTnHnMnS") |
Duration for days and time where "n" is a variable |
duration("P3DT4H17M32S") means duration of 3 days, 4 hours, 17 minutes and 32 seconds. |
Years and Months Duration
Types |
Description |
Example |
duration("PnYnM") |
Duration for years and months where "n" is a variable |
duration("P2Y7M") means duration of 2 years and 7 months. |
Date
Types |
Description |
Example |
date("YYYY-MM-DD") |
Date |
date("2016-02-08") means The 8th of February 2016. |
today() |
Current date |
Time
Types |
Description |
Example |
time("HH:mm:ss") |
Time |
time("13:06:57") means 1PM, 6minutes and 57 seconds. |
Date and time
Types |
Description |
Example |
date and time("YYYY-MM-DD HH:mm:ss") |
Date and Time |
date and time("2016-02-08 13:06:57") means The 8th of February 2016 at 1PM, 6minutes and 57 seconds. |
now() |
Current date and time |
Below is a concrete example for Vacation Days allocated to employees depending on their age and years of service: