我有以下课程
public class DroolsObjectRule {
private String backend;
private Long time;
private Long avgTime;
private boolean allow=true;
private String message;
//Set
//Get
}
我的规则
rule "rule_3_increment_more"
salience 3
when
$drol: DroolsObjectRule(backend == "AD1" && (2 * $drol.avgTime) > $drol.time) [this is line 33]
then
$drol.setMessage("RULE 3");
end
当我运行代码时,出现以下错误
Caused by: java.lang.IllegalArgumentException:
[33,48]: [ERR 101] Line 33:48 no viable alternative at input '2'
in rule "rule_3_increment_more" in pattern DroolsObjectRule
[33,79]: [ERR 102] Line 33:79 mismatched input ')' expecting '('
in rule "rule_3_increment_more" in pattern DroolsObjectRule in pattern $drol.time
任何想法?