did you try with:<br>eval(list.contains(&quot;rule1&quot;)) ?<br><br><br><div class="gmail_quote">On Sun, Jan 10, 2010 at 6:37 AM, orchid <span dir="ltr">&lt;<a href="mailto:maya.pollack@gmail.com">maya.pollack@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi All,<br>
<br>
I have a question regarding using a global list. I have the following rule:<br>
<br>
global java.util.List list List;<br>
<br>
Rule &quot;rule1&quot;<br>
 when<br>
   A<br>
 then<br>
   list.add(&quot;rule1&quot;);<br>
<br>
When I&#39;m trying to check the list content in LHS of another rule I get a<br>
compilation error: &quot;mismatch input ...&quot;:<br>
<br>
Rule &quot;rule2&quot;<br>
 when<br>
   list.contains(&quot;rule1&quot;) /*or: list contains &quot;rule1&quot;*/<br>
 then<br>
   ...<br>
How do I check the list content from LHS?<br>
<br>
Thanks you in advance.<br>
Any help would be appreciated :-)<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/Using-a-global-list-in-a-rule-tp115746p115746.html" target="_blank">http://n3.nabble.com/Using-a-global-list-in-a-rule-tp115746p115746.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<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>
</font></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>