FEEL

FEEL range functions

14 built-in functions · DMN 1.6

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.

All FEEL range functions at a glance

FunctionSignatureReturns
beforebefore(a, b)Returns true if a lies entirely before b with no overlap
afterafter(a, b)Returns true if a lies entirely after b with no overlap
meetsmeets(range1, range2)Returns true if range1 ends exactly where range2 begins, with both endpoints included
met bymet by(range1, range2)Returns true if range1 begins exactly where range2 ends, the mirror of meets
overlapsoverlaps(range1, range2)Returns true if the ranges share at least one point, in either order
overlaps beforeoverlaps before(range1, range2)Returns true if range1 starts before range2 and they overlap without either containing the other
overlaps afteroverlaps after(range1, range2)Returns true if range1 ends after range2 and they overlap without either containing the other, the mirror of overlaps before
finishesfinishes(a, range)Returns true if a ends exactly where range ends and lies within it
finished byfinished by(range, a)Returns true if range ends exactly where a ends and contains it, the mirror of finishes
includesincludes(range, a)Returns true if range fully contains a, endpoints included
duringduring(a, range)Returns true if a lies fully inside range, the mirror of includes
startsstarts(a, range)Returns true if a begins exactly where range begins and lies within it
started bystarted by(range, a)Returns true if range begins exactly where a begins and contains it, the mirror of starts
coincidescoincides(a, b)Returns true if two points are equal or two ranges have identical endpoints and closures

Function reference

Each function with its parameters, examples and edge cases.

before

before(a, b)

Returns true if a lies entirely before b with no overlap.

ParameterTypeDescription
apoint or rangethe earlier candidate
bpoint or rangethe later candidate
before(1, 10)
before([1..5], [6..10])
before(10, [1..5])

Related: after · meets

after

after(a, b)

Returns true if a lies entirely after b with no overlap.

ParameterTypeDescription
apoint or rangethe later candidate
bpoint or rangethe earlier candidate
after(12, [1..10])
after([11..12], [1..10])

Related: before · met by

meets

meets(range1, range2)

Returns true if range1 ends exactly where range2 begins, with both endpoints included.

ParameterTypeDescription
range1rangethe earlier range
range2rangethe later range
meets([1..5], [5..10])
meets([1..4], [6..10])

Related: met by · overlaps

met by

met by(range1, range2)

Returns true if range1 begins exactly where range2 ends, the mirror of meets.

ParameterTypeDescription
range1rangethe later range
range2rangethe earlier range
met by([5..10], [1..5])

Related: meets · overlaps

overlaps

overlaps(range1, range2)

Returns true if the ranges share at least one point, in either order.

ParameterTypeDescription
range1rangefirst range
range2rangesecond range
overlaps([1..5], [3..8])
overlaps([1..5], [6..8])

Related: overlaps before · overlaps after · includes

overlaps before

overlaps before(range1, range2)

Returns true if range1 starts before range2 and they overlap without either containing the other.

ParameterTypeDescription
range1rangethe range that starts first
range2rangethe range it overlaps into
overlaps before([1..5], [3..8])
overlaps before([3..8], [1..5])

Related: overlaps · overlaps after

overlaps after

overlaps after(range1, range2)

Returns true if range1 ends after range2 and they overlap without either containing the other, the mirror of overlaps before.

ParameterTypeDescription
range1rangethe range that ends last
range2rangethe range it overlaps out of
overlaps after([3..8], [1..5])

Related: overlaps · overlaps before

finishes

finishes(a, range)

Returns true if a ends exactly where range ends and lies within it.

ParameterTypeDescription
apoint or rangethe candidate ending together with range
rangerangethe enclosing range
finishes(10, [1..10])
finishes([5..10], [1..10])

Related: finished by · starts

finished by

finished by(range, a)

Returns true if range ends exactly where a ends and contains it, the mirror of finishes.

ParameterTypeDescription
rangerangethe enclosing range
apoint or rangethe candidate ending together with range
finished by([1..10], [5..10])

Related: finishes · includes

includes

includes(range, a)

Returns true if range fully contains a, endpoints included.

ParameterTypeDescription
rangerangethe enclosing range
apoint or rangethe contained candidate
includes([1..10], 5)
includes([1..10], [4..6])

Related: during · overlaps

during

during(a, range)

Returns true if a lies fully inside range, the mirror of includes.

ParameterTypeDescription
apoint or rangethe contained candidate
rangerangethe enclosing range
during(5, [1..10])
during([4..6], [1..10])

Related: includes · starts · finishes

starts

starts(a, range)

Returns true if a begins exactly where range begins and lies within it.

ParameterTypeDescription
apoint or rangethe candidate starting together with range
rangerangethe enclosing range
starts(1, [1..10])
starts([1..5], [1..10])

Related: started by · finishes

started by

started by(range, a)

Returns true if range begins exactly where a begins and contains it, the mirror of starts.

ParameterTypeDescription
rangerangethe enclosing range
apoint or rangethe candidate starting together with range
started by([1..10], [1..5])

Related: starts · includes

coincides

coincides(a, b)

Returns true if two points are equal or two ranges have identical endpoints and closures.

ParameterTypeDescription
apoint or rangefirst value
bpoint or rangesecond value
coincides(5, 5)
coincides([1..5], [1..5])

Related: includes · overlaps

How B-FEEL differs

In standard FEEL an invalid argument makes the result null. The business-friendly B-FEEL dialect returns a type default instead. Both columns were evaluated by the same engine:

ExpressionFEELB-FEEL
before(null, 5)nullfalse
includes([1..10], null)nullfalse
overlaps(null, [1..5])nullfalse

More FEEL guides

FEEL string functions · FEEL numeric functions · FEEL list functions · FEEL date and time functions · Language constructs · Examples cheat sheet

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).