<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Have you thought of combining a&nbsp; control fact or field with the
duration attribute?<br>
<br>
Mark<br>
Faizan wrote:
<blockquote cite="mid:8390418.post@talk.nabble.com" type="cite">
  <pre wrap="">
My Fact/object (order) has multiple attributes and "due date" is one of
them. A single rule is based on a combination of more than one attribute. My
rule's when condition are dynamic and configurable by the end-user. An
example of a rule's condition could be:
when
       Order(dueDate &lt; (some date), quantity &gt; 1000)
then
      //do something

Dynamic rule here means that "some date" could be the current-date or it
could be current-date + 2 days i.e configurable. The thread I'm talking
about runs once a day to check the the due date condition.
Now the problem is that if the object is not changed and we call
fireAllRules() then even if the duedate condition is met then too the rule
is not fired because the object is not changed.



Michael Suzio wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Why couldn't the object itself know when the due date has passed?  If you
kept calling fireAllRules periodically in a thread, and had a rule like:

when
  Order (dueDatePassed == true)
then
 // do something
end

Then you just need a isDueDatePassed method in the Order object, which
itself compares the due date to the current time.

    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
</body>
</html>