Sigh! I don't understand what is going on.
I added another rule which is almost identical:
rule BidderReqCorrection
no-loop
activation-group "permissions"
when
c: PermissionCheck(name == "stuff", action == "find", granted =
false)
Role(name == "A Role")
AppProp(now == (new Date()), s: startDate -> (s.getTime() < now.getTime()),
e: endDate -> (e.getTime() > now.getTime()) )
then
c.grant();
modify(c);
end;
But now I get the error:
org.drools.rule.InvalidRulePackage: Unable to create Field Extractor for
'now'
Rule Compilation error Unknown variable or type "now" Class "
java.lang.Object" has no method named "getTime" Expression "now"
is not an
rvalue Expression "now" is not an rvalue Expression "now" is not an
rvalue
Exception:null
Its a copy-and-paste from the first rule. Just changed the action from "do"
to "find".
It does not matter if I comment out all the other rules or not. This new
rule always causes the error.