FEEL built-in functions: the complete reference
All 88 built-in functions of FEEL (Friendly Enough Expression Language) as defined by OMG DMN 1.6, each with syntax, parameters and examples whose results are computed by a real FEEL engine. Try any of them live in the free online FEEL evaluator.
Conversion functions
Constructors that build FEEL values from strings or components: temporal values, numbers and strings. Formats follow ISO 8601.
| Function | Signature |
|---|---|
| date | date(from) or date(year, month, day) |
| time | time(from) or time(hour, minute, second, offset?) |
| date and time | date and time(from) or date and time(date, time) |
| duration | duration(from) |
| years and months duration | years and months duration(from, to) |
| number | number(from, grouping separator?, decimal separator?) |
| string | string(from) |
Boolean & miscellaneous
The boolean negation function and general-purpose helpers that don't belong to a larger family.
| Function | Signature |
|---|---|
| not | not(negand) |
| is | is(value1, value2) |
String functions
Functions for inspecting and transforming FEEL strings. Positions are 1-based; pattern arguments use XPath/XQuery regular expression syntax.
| Function | Signature |
|---|---|
| substring | substring(string, start position, length?) |
| string length | string length(string) |
| upper case | upper case(string) |
| lower case | lower case(string) |
| substring before | substring before(string, match) |
| substring after | substring after(string, match) |
| contains | contains(string, match) |
| starts with | starts with(string, match) |
| ends with | ends with(string, match) |
| matches | matches(input, pattern, flags?) |
| replace | replace(input, pattern, replacement, flags?) |
| split | split(string, delimiter) |
| string join | string join(list, delimiter?) |
Numeric functions
Functions on FEEL numbers. FEEL has a single decimal number type; scale arguments count decimal digits after the point.
| Function | Signature |
|---|---|
| decimal | decimal(n, scale) |
| floor | floor(n, scale?) |
| ceiling | ceiling(n, scale?) |
| round up | round up(n, scale?) |
| round down | round down(n, scale?) |
| round half up | round half up(n, scale?) |
| round half down | round half down(n, scale?) |
| abs | abs(n) |
| modulo | modulo(dividend, divisor) |
| sqrt | sqrt(number) |
| log | log(number) |
| exp | exp(number) |
| odd | odd(number) |
| even | even(number) |
List functions
Functions over FEEL lists. Lists are ordered, may contain any values including nulls and nested lists, and positions are 1-based; negative positions count from the end.
| Function | Signature |
|---|---|
| list contains | list contains(list, element) |
| count | count(list) |
| min | min(list) or min(c1, …, cN) |
| max | max(list) or max(c1, …, cN) |
| sum | sum(list) or sum(n1, …, nN) |
| mean | mean(list) or mean(n1, …, nN) |
| median | median(list) or median(n1, …, nN) |
| stddev | stddev(list) or stddev(n1, …, nN) |
| mode | mode(list) or mode(n1, …, nN) |
| all | all(list) or all(b1, …, bN) |
| any | any(list) or any(b1, …, bN) |
| sublist | sublist(list, start position, length?) |
| append | append(list, item…) |
| concatenate | concatenate(list…) |
| insert before | insert before(list, position, newItem) |
| remove | remove(list, position) |
| reverse | reverse(list) |
| index of | index of(list, match) |
| union | union(list…) |
| distinct values | distinct values(list) |
| duplicate values | duplicate values(list) |
| flatten | flatten(list) |
| product | product(list) or product(n1, …, nN) |
| sort | sort(list, precedes?) |
| list replace | list replace(list, position | match, newItem) |
| partition | partition(list, size) |
Temporal functions
Functions producing or inspecting dates and times. Together with FEEL's temporal arithmetic (date + duration, date - date) they cover most calendar logic in decision models.
| Function | Signature |
|---|---|
| now | now() |
| today | today() |
| day of year | day of year(date) |
| day of week | day of week(date) |
| month of year | month of year(date) |
| week of year | week of year(date) |
| last day of month | last day of month(date) |
Range functions
Boolean relations between points and ranges, modeled on Allen's interval algebra. Ranges are written [1..10] (closed) or (1..10) / ]1..10[ (open); all functions accept numbers, strings and temporal values.
| Function | Signature |
|---|---|
| before | before(a, b) |
| after | after(a, b) |
| meets | meets(range1, range2) |
| met by | met by(range1, range2) |
| overlaps | overlaps(range1, range2) |
| overlaps before | overlaps before(range1, range2) |
| overlaps after | overlaps after(range1, range2) |
| finishes | finishes(a, range) |
| finished by | finished by(range, a) |
| includes | includes(range, a) |
| during | during(a, range) |
| starts | starts(a, range) |
| started by | started by(range, a) |
| coincides | coincides(a, b) |
Context functions
Functions over FEEL contexts, the key/value records written as {name: value, …}. They read entries dynamically and build modified copies without mutating the original.
| Function | Signature |
|---|---|
| get value | get value(context, key) |
| get entries | get entries(context) |
| context | context(entries) |
| context put | context put(context, keys, value) |
| context merge | context merge(contexts) |