[rules-users] No viable alternative at input since upgrade to 5.4.0.Final

tekbrain jlpiolain at plexo.ca
Tue Oct 2 11:55:48 EDT 2012


Hi,

We have rules in domain specific language that don't work anymore.

In our dsl mapping definition:

Language expression: COUNT\({attr:[A-Z][A-Z_\d]+}\)
{constraint:(>|>\=|<|<\=|\=\=|!\=)}  {num:[\d\.]+}
Rule mapping: ArrayList( size {constraint} {num} ) from collect (Fact( name
== "{attr}", dataset == "0", ignore == "false" ))
Scope: condition (when)

[condition][]COUNT\({attr:[A-Z][A-Z_\d]+}\)
{constraint:(>|>\=|<|<\=|\=\=|!\=)} {num:[\d\.]+}=ArrayList( size
{constraint} {num} ) from collect (Fact( name == "{attr}", dataset == 0,
ignore == false ))


One of the rules:
rule 'BP - HOMULTIPLE'
  agenda-group "user-rules"
  no-loop true
  when
    COUNT(BP_HOCONDITION) >= 2
  then
    set BP_HOMULTIPLE
end

Expanded rule should be something like this:
rule 'BP - HOMULTIPLE'
  agenda-group "user-rules"
  no-loop true
  when
    ArrayList(size >= 2) from collect (Fact( name == "BP_HOCONDITION",
dataset == "0", ignore == "false" ))
  then
    insertLogical(new StateFact("BP_HOMULTIPLE"));
end

Everything was working with Drools 5.1 but with Drools 5.4.0.Final, we have
this kind of errors:
[3788,20]: [ERR 101] Line 3788:20 no viable alternative at input '>=' in
rule "BP - HOMULTIPLE"

Did we forget something?

Thanks,

Jean-Luc






--
View this message in context: http://drools.46999.n3.nabble.com/No-viable-alternative-at-input-since-upgrade-to-5-4-0-Final-tp4020083.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list