<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all<br>
    <br>
    I'm still struggling with the handling of lists and membership in
    the LHS of rule. I'm trying to formulate a rule that only fires if a
    certain object is not yet a member of a list.<br>
    <br>
    Here's what I currently have (Drools 5.5.0 btw):<br>
    <br>
    <blockquote><tt>rule "R2030: UpdateDQAttribute"</tt><br>
      <tt>dialect "mvel" </tt><br>
      <tt>agenda-group "PROCESS_CHECKRESULTS"</tt><br>
      <tt>when</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; pv : PriceViolation ( p : changedPrice.price, dqc : check
        )</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; ps : PriceSeries ( id == p.seriesId )</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; i : Instrument ( id == ps.instrument.id )</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; dqa : DQAttribute ( rootId == i.id, objectId == p.id )</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; not dqcv : DQCheckViolation ( check.id == dqc.id ) from
        dqa.checkViolations</tt><br>
      <tt>then</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; # debug</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; for (DQCheckViolation dqcv : dqa.checkViolations) {</tt><br>
      <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.debug("dqc: {}, dqcv: {}", dqc.id,
        dqcv.check.id);</tt><br>
      &nbsp;&nbsp;&nbsp; <br>
      <tt>&nbsp;&nbsp;&nbsp; }<br>
        end</tt><br>
    </blockquote>
    The rule fires and the log statement produces<br>
    <br>
    <blockquote><tt>PriceCheck: dqc:
        6fc6636b-9b7c-4302-bce7-1680eec57830, dqcv:
        6fc6636b-9b7c-4302-bce7-1680eec57830</tt><br>
    </blockquote>
    The ids are the same, so I would have expected that last LHS
    condition to avoid that the rule fires.<br>
    <pre class="moz-signature" cols="72">-- 
CU, Joe</pre>
  </body>
</html>