<br>   All,<br><br>   I isolated the problem and submitted a bug for the macro processing engine. We shall have a fix soon.<br><br>   Thanks for reporting.<br><br>   Edson<br><br><div class="gmail_quote">2009/3/24 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>   Wolfgang,<br><br>   Yes, Drools rewrites insert() to drools.insert() before compiling. It seems we have a problem in the function that does the rewrite.<br>
<br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/3/24 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span><div><div></div><div class="h5">
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The RHS of a rule X winds up in some class Rule_X_0. Calls like insert(), retract(), etc. are, by definition, method calls of WorlingMemoryEntryPoint, and the compiler ought to prefix them with the global reference to that object, i.e., &quot;drools&quot;. This fails within if statements, both branches.<br>


<br>If you write, inside (or outside) if<br>   drools.insert(...);<br>   drools.retract(...)<br>all is well.<br><br>-W<br><br><br><div class="gmail_quote">2009/3/23 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span><div>

<div></div><div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>   This is odd, since this part of the code didn&#39;t changed much from drools 4 to 5 (assuming you are using java dialect for your consequence). Can you open a JIRA with your test case plz?<br>


<br>   []s<br>   Edson<br>
<br><div class="gmail_quote">2009/3/23 Jared Davis <span dir="ltr">&lt;<a href="mailto:sunray@davisprogramming.com" target="_blank">sunray@davisprogramming.com</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



Hi,<br>
<br>
This rule (not the best style) compiles fine in 4.07. It gives this error<br>
message using 5.0 Snapshot. I changed some of the text to be generic so I could<br>
post the code.<br>
<br>
Rule Compilation error : [Rule name=&#39;A.B.inlet.mxb.first.link.20090216.01&#39;]<br>
        com/zzzzzz/yyy/awl/Rule_A_B_inlet_mxb_first_link_20090216_01_0.java<br>
(11:5517) : The method insert(RuleLink) is undefined for the type<br>
Rule_A_B_inlet_mxb_first_link_20090216_01_0<br>
<br>
<br>
Here is the rule: (I had to change all the &gt; to . to get gmane to accept the<br>
email as a non top post)<br>
<br>
rule &quot;A.B.inlet.mxb.first.link.20090216.01&quot;<br>
agenda-group &quot;A.B&quot;<br>
when<br>
<br>
.     comp :     XComponentRule( path == &quot;~unit~mxb&quot;)<br>
then<br>
.     Point3d l = new Point3d();<br>
.     comp.getBounds().getLower(l);<br>
<br>
.     if (l.x &lt; 1)  {<br>
.        insert( new RuleLink(&quot;FIRST.INLET&quot; , comp, comp) );<br>
.     } else {<br>
.        insert( new RuleLink(&quot;FIRST.INLET.NOT&quot; , comp, comp) );<br>
.     }<br>
.<br>
end<br>
<br>
If I change the rule to<br>
<br>
rule &quot;A.B.inlet.mxb.first.link.20090216.01&quot;<br>
agenda-group &quot;A.B&quot;<br>
when<br>
<br>
.     comp :     XComponentRule( path == &quot;~unit~mxb&quot;)<br>
then<br>
.     Point3d l = new Point3d();<br>
.     comp.getBounds().getLower(l);<br>
.     String name = &quot;FIRST.INLET&quot;;<br>
.     if (l.x &lt; 1)  {<br>
.       // nothing<br>
.     } else {<br>
.       name = &quot;FIRST.INLET.NOT&quot;;<br>
.     }<br>
.     insert( new RuleLink(name , comp, comp) );<br>
.<br>
end<br>
<br>
it compiles w/o a problem.<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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></div></div><font color="#888888"><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>



</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div></div></div><div><div></div><div class="h5"><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>

</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>