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 |
|
number |
|
string |
|
date and time |
|
date |
|
time |
|
years and months durations |
|
days and time duration |
|
collection |
|
range |
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
1 |