[rules-users] Is this syntax correct?
Shai Bentin
shai at bentin.org
Tue Jul 24 04:27:10 EDT 2007
I need to fire a rule if I have more then one fact that has an endDate property from the last 24 months... is the follwoing correct?
rule "testing123"
when
olList: ArrayList(size > 1) from collect(CreditEventLocal(creditEventTypeVlId == "SOMETHING", $endDate: endDate -> ($endDate.after(DateUtils.addMonthsFromToday(-24)))))
then
System.out.println("eurika");
end
Anyhow, if it is then I get a NullPointerException which doesn't tell me what the problem is. It happens in building time of course:
I'm using drools4.0.0MR2
Exception in thread "main" java.lang.NullPointerException
at org.drools.rule.builder.dialect.java.JavaConsequenceBuilder.build(JavaConsequenceBuilder.java:53)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:65)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:353)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:233)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:157)
at com.emi.framework.antTasks.PackageRules.addPackages(PackageRules.java:227)
at com.emi.framework.antTasks.PackageRules.execute(PackageRules.java:143)
at com.emi.framework.antTasks.PackageRules.main(PackageRules.java:325)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070724/ab166ef2/attachment.html
More information about the rules-users
mailing list