java - "no viable alternative at input n" and "mismatched input" -
i have following class
public class droolsobjectrule { private string backend; private long time; private long avgtime; private boolean allow=true; private string message; //set //get }
my rule
rule "rule_3_increment_more" salience 3 when $drol: droolsobjectrule(backend == "ad1" && (2 * $drol.avgtime) > $drol.time) [this line 33] $drol.setmessage("rule 3"); end
when run code following error
caused by: java.lang.illegalargumentexception: [33,48]: [err 101] line 33:48 no viable alternative @ 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
any idea?
the rule works correctly in 5.3.0, 5.6.0, 5.5.0, 6.0.0 , 6.1.0.
if use older version, stick legacy form of constraints:
droolsobjectrule( backend == "ad1", $avgtime: avgtime, time < 2*$avgtime )
Comments
Post a Comment