<br>&nbsp;&nbsp; Allen,<br><br>&nbsp;&nbsp; For Drools 4, the way to go is following the suggestions given by the other list members. Drools 4 has no concept of clock itself, so you need to handle time as a fact.<br>&nbsp;&nbsp; Drools 5 brings a whole new framework to deal with time, where you have the concept of a session clock that can be used to constraint facts, etc. But Drools 5 is still in development.<br>
<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/6/5 Bagwell, Allen F &lt;<a href="mailto:afbagwe@sandia.gov">afbagwe@sandia.gov</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">







<div>
<font face="Arial, sans-serif" size="3">
<div>&nbsp;</div>
<div><font size="2">Another noob question:</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">Is there a generally understood way of implementing the concept of a time interval rule?</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">That is, lets say I have a Drools-enabled client which is constantly receiving information from outside resources. Most of this data (and the consequences of its changes) is time sensitive, so I&#39;m calling the fireAllRules() method in a loop
every minute.</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">And now, let&#39;s say I have a rule that in addition to being driven by incoming data changes has to be linked to a repeating clock interval or synched with wall time such that the rule only activates and fires if the data meets certain parameters
AND it&#39;s been exactly 1 hour since the last check or that it will fire at the top of every wall time hour (1 PM, 2PM, 3 PM, etc.).</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">Furthermore, timing may change. A successful rule activation and firing might do something like &quot;now change this timing so that for the next 24 hours, this rule must be examined every 30 minutes instead of every hour&quot;. </font></div>

<div><font size="2">&nbsp;</font></div>
<div><font size="2">My initial reading of the Drools documetation I came across the Duration, and Date-* keywords. Their descriptions didn&#39;t seem to fit the bill.</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">I ask this because our old rules engine software that has been retired to obsolescence allowed this kind of thing to be easily set up. Coming at it in the Drools world seems a lot more challenging.</font></div>

<div><font size="2">&nbsp;</font></div>
<div><font size="2">Thoughts? Examples?</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">-Allen</font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt;"><font size="2">&nbsp;</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">&nbsp;</font></div>
</font>
</div>

<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>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>