<div>Ok, so on the first rule should fire for all occurrences of a Customer since each Customer should have at least one visit? </div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It&#39;s not another planning variable,<br>
instead,<br>
do something like<br>
<br>
when<br>
  ...<br>
then<br>
   insertLogical(new CustomerVisitArrivalTime(...));<br>
end<br>
<br>
when<br>
    CustomerVisitArrivalTime($c : customer, $a : arrival)<br>
    not CustomerTimeWindow(customer == $c, $a &gt; start, $a &lt; end)<br>
then<br>
    insertLogical(new IntConstraintOccurrence(...))<br>
end<br>
<br>
See nurseRosteringScoreRules.drl for an example of use of<br>
insertLogical&#39;s like that<br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div><div class="gmail_extra">Btw, thanks for your help and thanks for a great product!</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">
Mats</div>