Try this<br><a href="http://members.inode.at/w.laun/drools/CustomOperatorHowTo.html">http://members.inode.at/w.laun/drools/CustomOperatorHowTo.html</a><br>in combination with<br><a href="http://members.inode.at/w.laun/drools/SubsetOfEvaluatorsDefinition.java">http://members.inode.at/w.laun/drools/SubsetOfEvaluatorsDefinition.java</a><br>
<br>Feedback (to me personally) would be appreciated.<br>-W<br><br><br><div class="gmail_quote">2011/6/23 Hezi Stern <span dir="ltr">&lt;<a href="mailto:hezis@delegatecom.com">hezis@delegatecom.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;">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">I have in the working memory all possible sentences that can be presented to the user ( class Sentence() ).<u></u><u></u></p><p class="MsoNormal">Each sentence holds a collection (String collection) called descriptor that describe the sentence.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Based on  various rules I populate a collection called messageFilter which will be used to select the appropriate sentence.<u></u><u></u></p><p class="MsoNormal">
The proper sentence is one that all its descriptors match the one in the messageFilters<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">What I would like is something of the sort:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">$sentences:       ArrayList() <u></u><u></u></span></p><p class="MsoNormal" style="margin-left: 1.5in; text-indent: 0.5in;">
<b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">from</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">collect</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (Sentence(descriptor </span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">contains</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> messageFilter)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><u></u><u></u></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">                                                                                          </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><u></u><u></u></span></p>
<p class="MsoNormal">as messageFilter is a collection, this is not a valid code.<u></u><u></u></p><p class="MsoNormal">What would be the proper method to implement it.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am using drools 5.1.1 but am willing to upgrade to 5.2 if required.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Hezi<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p></div></div><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>
<br></blockquote></div><br>