[rules-users] Only simple types?

Wolfgang Laun wolfgang.laun at gmail.com
Fri Mar 22 12:01:10 EDT 2013


Here I have lots of classes with Boolean methods such as
   Boolean isSomething()
and a large number of rules where
   X(... something == true,...)
used to work fine not too long ago. But 5.5.0 and 5.4.0 claim that
this isn't correct:
  Unable to Analyse Expression adult == true:
  [Error: unable to resolve method using strict-mode: express.Person.adult()]
  [Near : {... adult == true ....}]

This used to work in 5.3.0.

Trying to avoid the Boolean/bool discrepancy, I replaced true with the object:
   X(... something == Boolean.TRUE,...)
but being as strict as possible doesn't work, too, neither in 5.4.0nor 5.5.0.

This used to work in 5.3.0, and so did the very simple
   X(... something,...)
but not any more.

The fact that all of the following work in 5.5.0
   X(... isSomething(),... )
   X(... isSomething() == true,... )
   X(... isSomething() == Boolean.TRUE,... )
is certainly nice, but:

Since I'm going to have to change a ton of rules: Which of these
versions should I use to have best chances for future compatibility?

Thanks
-W


More information about the rules-users mailing list