B-FEEL

B-FEEL (Business Friendly Enough Expression Language) shares the same grammar as FEEL but alters the semantics to be friendlier and more intuitive toward non-IT users.

In FEEL, the null value is used to both represent missing data or an execution error. In B-FEEL, null is used only to represent missing data. All operations and built-in functions that returns null in FEEL when an error occurs have their semantics modified in B-FEEL to return a non-null value. A warning message will still be produced when an error occurs.

Using the B-FEEL dialect is a model wide property and can be toggled in the FEEL Dialect dialog from the EXECUTION ribbon.

When previously, a built-in function or an operator would have returned null to indicate an error, it returns the default value based on the return type.

Data Type

Default Value

boolean

false

number

0

string

""

date and time

date and time(“1970-01-01T00:00:00+00:00”)

date

date(“1970-01-01”)

time

time(“00:00:00+00:00”)

years and months durations

duration("P0M")

days and time duration

duration("PT0S")

collection

[]

range

(0..0)

There is an exception to the default value for boolean operator. The != operator returns true instead of false on an error. Ex: “a” != 1 returns true
The following functions in B-FEEL also ignored non-numeric parameters in their input collection: mean(), median(), product(), stddev(), sum().

Some example of B-FEEL results:

Expression

B-FEEL Result

"a" = 1

false

"a" != 1

true

true and "x"

false

"a" in [1..100]

false

round up(“5.5”, 0)

0

string length(22)

0

sum([1, null, 3])

4

lowercase(12)

""

date(null)

date(“1970-01-01”)

B-FEEL also augment the FEEL semantic for mathematical operators (+, -, *, / and \**). It will consider both sides of the expression to try to convert one of the operands (prioritizing string over number) to repair the expression.

Some example of mathematical operator usage:

Expression

B-FEEL Result

"The result is: " + 1

"The result is: 1"

5 + " minutes"

"5 minutes"

"This is " + null

"This is "

1 + null

1