Continuing trying to upgrade from drools 5.1 I've been finding some strange funnies in
rules behavior. Currently I'm using
<droolsVersion>5.3.0.Beta1</droolsVersion>
<jbpmVersion>5.1.0.Final</jbpmVersion>
<mvelVersion>2.1.Beta6</mvelVersion>
In our model we've got some lists (Yuck I know) and we want to test whether they are
not empty, there are three variations of the rules that we could use
rule "TESTa"
when
t : Title(t.getMyList().isEmpty() == false)
then
logger.debug(drools.getRule().getName() + " " + drools.getTuple());
end
rule "TESTb"
when
t : Title(myList.isEmpty() == false)
then
logger.debug(drools.getRule().getName() + " " + drools.getTuple());
end
rule "TESTc"
when
t : Title(myList.empty == false)
then
logger.debug(drools.getRule().getName() + " " + drools.getTuple());
end
I'd expect all of these formats to work (particularly c) however only TESTa succeeds,
the other two FAIL SILENTLY, failing to match anything but not generating any errors or
warnings.
Thomas
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received
this message in error, please immediately notify the postmaster(a)nds.com and delete it from
your system as well as any copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the environment please
do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United
Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603
8808 40-00
**************************************************************************************