I am not sure exactly what you are trying to express with your example, but more likely than not, you&#39;ll be able to do what you are trying through the collect conditional element.<br><br>Something along the lines of this?<br>
<br>when <br>    a: Answer($responses : responses)<br>    java.util.ArrayList( size &gt; 1 ) from collect (String(this == &quot;a&quot; || == &quot;b&quot; || == &quot;c&quot;) from $responses)<br>then<br>    System.out.println(&quot;Cannot have more than one response!&quot;);<br>

<br><div class="gmail_quote">On Fri, Aug 22, 2008 at 4:18 PM, David Cracauer <span dir="ltr">&lt;<a href="mailto:dcracauer@earthlink.net" target="_blank">dcracauer@earthlink.net</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,<br>
I&#39;m getting stuck on this and I&#39;m hoping someone can help..<br>
I need to be able to check that a collection contains one, and only one item<br>
from another collection.<br>
<br>
Ideally, I would do something like this:<br>
<br>
 a:Answer(responses contains one of (&quot;a&quot;,&quot;b&quot;,&quot;c&quot;));<br>
<br>
Is there a way do do this without resorting to evals or predicate<br>
expressions? (drools 4.07)<br>
<br>
Thanks,<br>
Dave<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://www.nabble.com/Can-I-check-if-a-collection-contains-one-of-another-collection-tp19114896p19114896.html" target="_blank">http://www.nabble.com/Can-I-check-if-a-collection-contains-one-of-another-collection-tp19114896p19114896.html</a><br>



Sent from the drools - user mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>