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.

On 1/13/07, Faizan <[EMAIL PROTECTED]> wrote:


As i understand the rules get fired on a fact/object when it is modified
and
the workingMemory is notified of the change. I have a requirement where
one
attribute of a fact is time based (due date of an Order object) which is a
static field but i need to run a thread that periodically compares the
current date with this attribute so that i can fire a rule when the system
date matches with the due date. Now since the object is not modified
simply
calling fireAllRules() by this thread is not working for me.
A workaround that i have is to retract and assert (or modify) that object
everytime that thread calls fireAllRules()  but in that case i need to
call
modify on all Order objects lying in the working memory. Is there any
better
way to achieve this?

thanks,
Faizan
--
View this message in context:
http://www.nabble.com/How-to-get-a-rule-fired-when-the-object-is-not-changed--tf2970664.html#a8312507
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to