Iam first time user of Drools. In accumulate function I have a scenario to check for the (!= null) feature of java. But in Drools I find that != doesn't work .
when
$addr : String(length > 0) from accumulate(
$person : Person(),
action(
$addresses : $person.getAddresses();
// i want to check whether $addresses is not
null.
if($addresses !=null) is what i want to achieve
)
Any help is really appreciated.
Edit the rule as Below :
Person(adresses !=null) && $addr : String(length > 0) from accumulate(
$person : Person(),
action(
$addresses : $person.getAddresses();
)