Hello, i had similar problems with or constructs, and decided to avoid them.
Drools expert manual says that or constructs are internally rewritten, i
suppose this mechanism is not fine-tuned.
My 2 cents...
2010/5/24 Piotr Jedrychowski <pjedrychowski(a)proximetry.pl>
Hello.
I have a problem with such a condition after 'when':
(or (and MyFact(id==1) MyFact(id==2)) (or MyFact(id==3) MyFact(id==4)))
For this condition I got this error:
errors; [7,41]: [ERR 101] Line 7:41 no viable alternative at input 'or'
in rule "Sensor-1-ON"[7,64]: [ERR 102] Line 7:64 mismatched input
'MyFact' expecting ')' in rule "Sensor-1-ON"[7,84]: [ERR 102]
Line 7:84
mismatched input ')' expecting 'then' in rule "Sensor-1-ON"
When I changed my condition to this:
(or (and MyFact(id==1) MyFact(id==2)) MyFact(id==3) MyFact(id==4))
everything is correct. Both conditions from logic point of view, are the
same, but the first one can't be compiled. Why?
Maybe someone had similar problem and could help me?
I'm using:
* JBoss 4.2.3.GA
* Drools 5.0
Regards,
Piotr
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users