简体   繁体   中英

Drools 5.6 mvel null safe property navigation

I am trying to upgrade drools from version 5.1 to 5.6, in 5.1 we used mvel null safe property access as below, but after upgrading mvel property access operator (.?) no more recognised by drools. Is there any other way to achieve this in 5.6? Thanks.

rule "Hello world"
    salience -1
    dialect "mvel"
when
    $c : Hello ( eval( a.?b.?c.?d == null ) )
then
    invalidate($c, "d is missing");
end

Use !. , available in 5.5.0, possibly earlier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM