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 < (some date), quantity > 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:
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.
--
View this message in context:
http://www.nabble.com/How-to-get-a-rule-fired-when-the-object-is-not-chan...
Sent from the drools - user mailing list archive at
Nabble.com.