I want to know how I can express one object, zero on the left side, when I use the drool rule mechanism? And can someone tell me how to use the drools keyword “no” and so on. Thanks!
You can call notin whento check for null objects:
not
when
rule "somerule" no-loop when not AnObject() then // rule body when AnObject is null end;
Drools Java, ( ), . "" , , LHS , :
exists MyObject() not exists MyObject()
, , :
obj: MyObject(myProperty == null)