You can set up a periodic timer to update a Tick( currentTime ) and use this Tick fact in your rule:<br><br>rule &quot;Set Tick&quot;<br>     timer(int:0s 1s)<br>when<br>     $tick : Tick()<br>then<br>     modify( $tick ){ setCurrentTime( ... ) }<br>
end<br><br>rule &quot;tst&quot;<br>when<br>
      $ongoing: IntervalEvent( id == &quot;foo&quot;,  $s: msecstart, $d : msecdur ) )<br>    Tick( currentTime &gt;= $s &amp;&amp; &lt;= ($s+$d) )<br>then<br>...<br>end<br><br><div class="gmail_quote">On 28 October 2010 16:22, Jaroslav Pullmann <span dir="ltr">&lt;<a href="mailto:jaroslav.pullmann@fit.fraunhofer.de">jaroslav.pullmann@fit.fraunhofer.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear all,<br>
<br>
  I am wondering whether and how the rule activation might be contextualized<br>
  in respect to the existence of a time slot signalled via interval events (with a<br>
  non-null duration). The static rule attributes (date-effective, date-expires) are<br>
  not applicable here, neither is the temporal operator &quot;during&quot;, which requires<br>
  the existence of an explicit second event. The following approach demonstrates the<br>
  case but does not work (return value restrictions are not allowed to invoke time-<br>
  dependent functions):<br>
<br>
   rule &quot;active time slot&quot;<br>
     when<br>
                // partial condition met when there is a &quot;live&quot;/ongoing IntervalEvent &quot;foo&quot;<br>
           $system : System()<br>
           $ongoing: IntervalEvent( id == &quot;foo&quot;, $system.currentTimeMillis &lt;= ( msecstart + msecdur ) )<br>
          ... further patterns<br>
     then<br>
           ...<br>
     end<br>
<br>
  Many thanks for your suggestions!<br>
    Jaro<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>
</blockquote></div><br>