Hi,
I have the following rule:
rule "FG.23C"
when
exists
Record( $psc : psc == "323",
pa == "7[0-9]*",
sa == "F39040"
|== "F38010"
|== "F38090" )
$count : Integer() from accumulate (
Record( psc == "323",
pa matches "8[0-9]995",
sa matches "F390[4-8][2-5]" ),
init ( int count = 0; ),
action( count += count; ),
result( return new Integer(count); )
)
eval ($count < 4 )
then
System.out.println( "rule FC.23C has failed" );
System.out.println();
end
And for some reason I can’t compile correctly: I’m
getting the following error:
org.drools.rule.InvalidRulePackage: Rule Compilation error This
method must return a result of type Integer Syntax error on token
"(", ; expected Syntax error on token ")", delete this
token
at org.drools.rule.Package.checkValidity(Package.java:367)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:244)
at moh.ohfs.rules.RulesTest.readRule(RulesTest.java:70)
at
moh.ohfs.rules.RulesTest.main(RulesTest.java:22)
All brackets seem to be matching…. This happens
on 3.1M build.
Thanks,
Vlad