Expression Legend

You can decide to model your decisions in two ways: either by using natural language or by using the language defined by the DMN standard called "FEEL" for “Friendly Enough Expression Language”.

Data Type Guide

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.

Text

Types

Description

Example

text

Any text can be added

Sample text

Number

Types

Description

Example

57

Any number value can be added

57

Boolean

Types

Description

Example

true,false

True or false expressions

true

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.

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.

Below is a concrete example for Vacation Days allocated to employees depending on their age and years of service:

expression legend