title: Drools: Match local string from array in LHS of rule
body: <p>I am trying to create rules in which I check if a string is in a list of strings in the LHS of my rule. The list of strings to compare to is constant and known at the time of rule creation, but differs among many similar rules.</p>
  
  <p>An example rule is as such (the way I am writing them now):</p>
  
  <pre><code>rule "ruleX"
  when
      $a: MyObject() 
  then
      List&lt;String&gt; list = new ArrayList&lt;String&gt;();
      list.add("ABC");
      list.add("DEF");
  
      if (list.contains($a.getString()) {
          //do stuff
      }
  end
  </code></pre>
  
  <p>This will not take advantage of the some of the optimizations present in the PHREAK engine, because there is work done in the RHS that could be used to distinguish rules via the LHS.</p>
  
  <p>The contents of "list" vary over many of these similar rules. Is there a better way to do this? I can't imagine that a LAN database call would be faster.</p>