]
Edson Tirelli reassigned DROOLS-1734:
-------------------------------------
Assignee: Edson Tirelli (was: Matteo Mortari)
FEEL if in case of otherwise
----------------------------
Key: DROOLS-1734
URL:
https://issues.jboss.org/browse/DROOLS-1734
Project: Drools
Issue Type: Bug
Components: dmn engine
Reporter: Matteo Mortari
Assignee: Edson Tirelli
Spec says:
if FEEL(e 1 ) is true then FEEL(e 2 ) else FEEL(e 3 )
so if I follow the spec, NOT the code, it could happen that FEEL(e1) is:
true follows the spec, returns FEEL(e2)
false follows the spec, returns FEEL(e3)
otherwise if I follow the spec, it should return FEEL(e3), if I follow the code,
it's returning null (and an error).
The spec takes the position that 'if x then 1 else 2' should always
result in either 1 or 2, regardless of x (or the type of x). This
makes it easier for users to handle missing data, e.g. if x > 0 then x
else 0.