2011/3/22 Michael Anstis <span dir="ltr">&lt;<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You could investigate the lists being set-up with a low salience rule and suitable declarative model (or static in a JAR):-<br><br>rule &quot;setup&quot;<br>when<br>then<br>    insert(new Cheese(&quot;cheddar&quot;));<br>
    insert(new Cheese(&quot;brie&quot;));<br>
end<br></blockquote><div><br>This should have a very high salience.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>rule &quot;likes cheese&quot;<br>
when<br>    $c : Cheese( )<br>    $p : Person( likedCheeses contains $c )<br>then<br>    System.out.println($p.getName() + &quot; likes &quot; + $c.getName());  <br>end<br><br></blockquote><div> </div><div><br>I think the request was for a check of a fact property being one out of a list. If there&#39;s just one list,<br>
you can do<br>    $c : Cheese()<br>   $p : Person( favouriteCheese == $c,... )<br>or<br>   $p : Person(...)<br>   Cheese( name == $p.favouriteCheese )<br><br>With multiple lists, you might add a distinguishing property to the list element, e.g.<br>
  insert(new Cheese(&quot;French&quot;, &quot;Roquefort&quot;));<br>and then<br>  $p: Person(...)<br>  $c: Cheese( country ==  $p.country, name == $p.favouriteCheese )<br><br>-W<br><br><br><br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This appears to be possible in Guvnor, although tbh I&#39;ve not tried in anger.<br>
<br>With kind regards,<br><br>Mike <br><br>2011/3/22 Alexander, Scott F <span dir="ltr">&lt;<a href="mailto:scott.f.alexander@jpmorgan.com" target="_blank">scott.f.alexander@jpmorgan.com</a>&gt;</span><br><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
<div link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal"><span style="font-size: 11pt;">Hi,<br><br>Im pretty new to drools and have been going through the docs for the Expert and guvnor.  I have some basic unit tests running with the rules I am trying to replicate from a legacy system.  One of the rules my current system uses is to check a property in an Object against a list of values and fire if the property is present in the list ie list.contains(someValue);</span></p>

<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p><p class="MsoNormal"><span style="font-size: 11pt;">I am trying to find out what the best practise is for setting up the lists which will be checked against.  I don’t want to have to include these lists in java classes and upload them as facts.  I would much rather be able to manage them through guvnor so my non technical users can manage them themselves without the need to release a new jar file.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p><p class="MsoNormal"><span style="font-size: 11pt;">Thanks.</span></p><p class="MsoNormal"><span style="font-size: 11pt;"> </span></p><div><p class="MsoNormal">

<span style="font-size: 11pt;"> </span></p></div><p class="MsoNormal"> </p></div></div>
<p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at <a href="http://www.jpmorgan.com/pages/disclosures/email" target="_blank">http://www.jpmorgan.com/pages/disclosures/email</a>.  
</span></p><br></div></div>_______________________________________________<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>
<br></blockquote></div><br>
<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>