title: Drools: Using 'or' in criterium for building a list
body: <p>I am in a situation where I need to build a list of objects that comply to <em>the disjunction ('or') of two criteria</em>. These criteria themselves are atomic to me, I can't change them.</p>
  
  <p>I can't use <code>from collect</code> because it does not allow multiple patterns. <code>accumulate</code> does, but it does not allow anything that has -or simplifies to- a disjunction in its condition part. </p>
  
  <p>For example, I can do:</p>
  
  <pre><code>$myList: ArrayList() from accumulate (
      (and
          $book: Book()
          &lt;Constraint A&gt;
          &lt;Constraint B&gt;
      );
      collectList($book)
  )
  </code></pre>
  
  <p>These constraints can be other patterns or eval statements that in some way apply to $book and/or its properties. What I however <em>want</em> to do, but can <strong>not</strong> do:</p>
  
  <pre><code>$myList: ArrayList() from accumulate (
      (and
          $book: Book()
          (
              &lt;Constraint A&gt;
              or
              &lt;Constraint B&gt;
          )
      );
      collectList($book)
  )
  </code></pre>
  
  <p>Another way to go about this is to bring the disjunction outside of the <code>accumulate</code> clause, e.g.:</p>
  
  <pre><code>$listA: ArrayList() from accumulate (
      (and
          $book: Book()
          &lt;Constraint A&gt;
      );
      collectList($book)
  )
  $listB: ArrayList() from accumulate (
      (and
          $book: Book()
          &lt;Constraint A&gt;
      );
      collectList($book)
  )
  $myList: &lt;somehow concatenate lists listA and listB&gt;
  </code></pre>
  
  <p>For this I would need to concatenate two lists, and I haven't found that to be possible so far. I'm kinda stuck...</p>