did you try with:<br>eval(list.contains("rule1")) ?<br><br><br><div class="gmail_quote">On Sun, Jan 10, 2010 at 6:37 AM, orchid <span dir="ltr"><<a href="mailto:maya.pollack@gmail.com">maya.pollack@gmail.com</a>></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 "rule1"<br>
when<br>
A<br>
then<br>
list.add("rule1");<br>
<br>
When I'm trying to check the list content in LHS of another rule I get a<br>
compilation error: "mismatch input ...":<br>
<br>
Rule "rule2"<br>
when<br>
list.contains("rule1") /*or: list contains "rule1"*/<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 "Salaboy" Mauricio -<br>