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