With Rules DSL the variable may not be null. In fact, most of the time when you see this error it’s because the two operands are not compatible. When the Rules DSL is unable to coerce a type into one that is suitable for the operation it generates this sort of error.
It can’t tell you which line in your rule it failed on because this error is generated and kills the rule deep inside the rules engine where knowledge of which line of your rule is being interpreted is unknown. And the error stays there and never filters back up to your rule where you could catch it.
But there is a lot of useful information in that error which should help you find the line pretty quickly, with the help of some logging.
The rule UID is “heating-1”. That means the error occurred in the first rule defined in heating.rules.
The method it failed on is “operator_greaterThan” so the line that failed involves a >
comparison. So that narrows things down to those lines where you see >
.
Finally, now that you know that this error usually means you have a type error, and knowing that a Number Item can carry the non-number states NULL and UNDEF, I suspect your root problem is that you have a Number Item involved in a > comparison whose state is NULL or UNDEF.