Do not use '(' and ')' in patterns. This confuses the overall regex
for matching a line. This is sufficient:
{constraint:>|>\=|<|<\=|\=\=|!\=}
-W
On 02/10/2012, tekbrain <jlpiolain(a)plexo.ca> wrote:
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-up...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users