<div><br></div>   Given that your restriction is &quot;this &#39;options&#39; and only them, at least one instance of each&quot;, and you need that in a &quot;generic way&quot;, best is for you to create your own accumulate function. For Drools 5.1.1 your template would look like:<div>
<br></div><div>$options : List() from accumulate( </div><div>      $op : Option(),</div><div>      matchAll( [ ${param}, $op ] ) )</div><div><br><div>   Where ${param} is the list of options the user type in the decision table cell and matchAll is your own accumulate function with the semantics you described.</div>
<div><br></div><div>   Edson</div><div><br><br><div class="gmail_quote">2011/1/21 groovenarula <span dir="ltr">&lt;<a href="mailto:gnarula1@la-z-boy.com">gnarula1@la-z-boy.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Thanks for the options, Bruno and Wolfgang.<br>
<br>
But is there a more &#39;generic&#39; way to do the matches ? The problem I have is<br>
that the # of instances that might match could vary. And I have to provide a<br>
means for the business users to be able to provide that &#39;option&#39;s code&#39;<br>
using a decision table. Basically I need to be able to provide a construct<br>
that&#39;s would look something like :<br>
<br>
    Options<br>
    &quot;P1,P2&quot;<br>
    &quot;P1,P4,P5&quot;<br>
<br>
So in the above decision table had 2 rules where in the first row represents<br>
a rule that matches against Options with Codes P1 and P2. And the second<br>
rule would match against options with codes P1, P4 and P5.<br>
<br>
Is it possible to represent this using Drools decision tables ?<br>
<br>
Thanks<br>
Gurvinder<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2300564.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2300564.html</a><br>

</font><div class="im">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">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><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div></div>