Why couldn&#39;t the object itself know when the due date has passed?&nbsp; If you kept calling fireAllRules periodically in a thread, and had a rule like:<br><br>when<br>&nbsp; Order (dueDatePassed == true)<br>then<br>&nbsp;// do something
<br>end<br><br>Then you just need a isDueDatePassed method in the Order object, which itself compares the due date to the current time.<br><br><div><span class="gmail_quote">On 1/13/07, <b class="gmail_sendername">Faizan</b>
 &lt;<a href="mailto:fraza123@yahoo.com">fraza123@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>As i understand the rules get fired on a fact/object when it is modified and
<br>the workingMemory is notified of the change. I have a requirement where one<br>attribute of a fact is time based (due date of an Order object) which is a<br>static field but i need to run a thread that periodically compares the
<br>current date with this attribute so that i can fire a rule when the system<br>date matches with the due date. Now since the object is not modified simply<br>calling fireAllRules() by this thread is not working for me.
<br>A workaround that i have is to retract and assert (or modify) that object<br>everytime that thread calls fireAllRules()&nbsp;&nbsp;but in that case i need to call<br>modify on all Order objects lying in the working memory. Is there any better
<br>way to achieve this?<br><br>thanks,<br>Faizan<br>--<br>View this message in context: <a href="http://www.nabble.com/How-to-get-a-rule-fired-when-the-object-is-not-changed--tf2970664.html#a8312507">http://www.nabble.com/How-to-get-a-rule-fired-when-the-object-is-not-changed--tf2970664.html#a8312507
</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>