title: Comparing a field in a List of objects with a List of Strings in Drools
body: <p>Assume I have a <code>Policy</code>  object in Drools, that object contains a <code>List</code> of <code>Cover</code> objects, called <code>covers</code> and a <code>List</code> of <code>String</code> objects, which are called <code>requestedCovers</code>.</p>
  
  <p>The <code>Cover</code> object contains <code>type</code> field, which is a <code>String</code> object.</p>
  
  <p>I want to fire a rule if a requestedCover does not match a type in the Covers list.</p>
  
  <pre><code>rule "Add validation error for policies with requested covers that are not available"
  when
      $p: Policy(available == true, $requestedCovers: requestedCovers, $covers: covers)
      $requestedCover: String() from $requestedCovers
      Cover(type not contains $requestedCover) from $covers 
  then
      log.error("RHS rule not implemented yet. Found type {}.", $requestedCover);
  end
  </code></pre>
  
  <p>However this seems to trigger every Cover is the covers list.</p>
  
  <p>How to create this rule?</p>