Well, seems the parser is raising the wrong message here... need to fix that...
But the syntax should be something like:
rule "calculate average"
when
$media : Number( doubleValue > 50000)
from accumulate( Instance( $value : classValue ),
average($value))
then
System.out.println(media );
end
[]s
Edson
2007/9/6, Isabelle Hupont <ihupont@ita.es>:
Hi!
I'm integrating Weka with Drools v.4 and I have a parsing error while trying
to read the following DRL rule:
rule "calculate average"
when
$inst : Instance()
$media : Double(double value > 50000)
from accumulate($value : inst.classValue()
average($value))
then
System.out.println(media );
end
I have the following error:
org.drools.compiler.DroolsParserException: Unknown error while parsing. This
is a bug. Please contact the Development team.
at org.drools.compiler.DrlParser.compile
(DrlParser.java:180)
at org.drools.compiler.DrlParser.parse(DrlParser.java:61)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:158)
at com.sample.DroolsTest.readRule
(DroolsTest.java:67)
at com.sample.DroolsTest.main(DroolsTest.java:24)
What I am doing wrong?
Thx
--
View this message in context:
http://www.nabble.com/parsing-error-using-accumulate-tf4390367.html#a12517682
Sent from the drools - user mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com