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.

FunctionSignature
datedate(from) or date(year, month, day)
timetime(from) or time(hour, minute, second, offset?)
date and timedate and time(from) or date and time(date, time)
durationduration(from)
years and months durationyears and months duration(from, to)
numbernumber(from, grouping separator?, decimal separator?)
stringstring(from)

Boolean & miscellaneous

The boolean negation function and general-purpose helpers that don't belong to a larger family.

FunctionSignature
notnot(negand)
isis(value1, value2)

String functions

Functions for inspecting and transforming FEEL strings. Positions are 1-based; pattern arguments use XPath/XQuery regular expression syntax.

FunctionSignature
substringsubstring(string, start position, length?)
string lengthstring length(string)
upper caseupper case(string)
lower caselower case(string)
substring beforesubstring before(string, match)
substring aftersubstring after(string, match)
containscontains(string, match)
starts withstarts with(string, match)
ends withends with(string, match)
matchesmatches(input, pattern, flags?)
replacereplace(input, pattern, replacement, flags?)
splitsplit(string, delimiter)
string joinstring join(list, delimiter?)

Numeric functions

Functions on FEEL numbers. FEEL has a single decimal number type; scale arguments count decimal digits after the point.

FunctionSignature
decimaldecimal(n, scale)
floorfloor(n, scale?)
ceilingceiling(n, scale?)
round upround up(n, scale?)
round downround down(n, scale?)
round half upround half up(n, scale?)
round half downround half down(n, scale?)
absabs(n)
modulomodulo(dividend, divisor)
sqrtsqrt(number)
loglog(number)
expexp(number)
oddodd(number)
eveneven(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.

FunctionSignature
list containslist contains(list, element)
countcount(list)
minmin(list) or min(c1, …, cN)
maxmax(list) or max(c1, …, cN)
sumsum(list) or sum(n1, …, nN)
meanmean(list) or mean(n1, …, nN)
medianmedian(list) or median(n1, …, nN)
stddevstddev(list) or stddev(n1, …, nN)
modemode(list) or mode(n1, …, nN)
allall(list) or all(b1, …, bN)
anyany(list) or any(b1, …, bN)
sublistsublist(list, start position, length?)
appendappend(list, item…)
concatenateconcatenate(list…)
insert beforeinsert before(list, position, newItem)
removeremove(list, position)
reversereverse(list)
index ofindex of(list, match)
unionunion(list…)
distinct valuesdistinct values(list)
duplicate valuesduplicate values(list)
flattenflatten(list)
productproduct(list) or product(n1, …, nN)
sortsort(list, precedes?)
list replacelist replace(list, position | match, newItem)
partitionpartition(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.

FunctionSignature
nownow()
todaytoday()
day of yearday of year(date)
day of weekday of week(date)
month of yearmonth of year(date)
week of yearweek of year(date)
last day of monthlast 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.

FunctionSignature
beforebefore(a, b)
afterafter(a, b)
meetsmeets(range1, range2)
met bymet by(range1, range2)
overlapsoverlaps(range1, range2)
overlaps beforeoverlaps before(range1, range2)
overlaps afteroverlaps after(range1, range2)
finishesfinishes(a, range)
finished byfinished by(range, a)
includesincludes(range, a)
duringduring(a, range)
startsstarts(a, range)
started bystarted by(range, a)
coincidescoincides(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.

FunctionSignature
get valueget value(context, key)
get entriesget entries(context)
contextcontext(entries)
context putcontext put(context, keys, value)
context mergecontext merge(contexts)