You could define a new operator (similar to &quot;contains&quot; or &quot;memberOf&quot;) that<br>tests whether a field - a set of values - is a subset of a another set of values.<br><br>See my home page for a full recipe:  <a href="http://members.inode.at/w.laun/">http://members.inode.at/w.laun/</a><br>
<br>The code given there is for both sides being java.util.Collection. Handling of<br>arrays could be added. But you should also consider providing the sets for<br>the rules as static auxiliary facts.<br><br>-W<br><br><div class="gmail_quote">
On 29 September 2010 20:47, kpandey <span dir="ltr">&lt;<a href="mailto:kumar.pandey@gmail.com">kumar.pandey@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>
This works great for the case where all entries in fact matches all entries<br>
in rule.<br>
<br>
I have a case where a subset of facts can exist in the set of rule.<br>
<br>
How would I construct the rule in this case without using the exits and from<br>
as I did initially?<br>
<br>
so MyContext.classes has subset &quot;TStr1&quot;, &quot;TStr2&quot;, &quot;TStr3&quot; and rule has set<br>
&quot;TStr1&quot;, &quot;TStr2&quot;, &quot;TStr3&quot;, &quot;TStr4&quot;,&quot;TStr5&quot;,<br>
<br>
The rule should pass in this case as classes values are subset of rules.<br>
<br>
Thanks<br>
Kumar<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Matching-strings-in-two-arrays-tp1602511p1604185.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Matching-strings-in-two-arrays-tp1602511p1604185.html</a><br>

</font><div><div></div><div class="h5">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>
</div></div></blockquote></div><br>