[rules-users] How to get a rule fired when the object is not changed?

Faizan fraza123 at yahoo.com
Sat Jan 13 04:08:29 EST 2007


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.




More information about the rules-users mailing list