Hello, I've 2 rules which should be similar but the result is different and I can't understand why :
I insert an object Message() into drools with the following rule : rule "rule_a" timer (int:1s 1s) when SimpleClock ( d : dateInMillisec != 0 ) // SimpleClock give the current time (set by a java timer and an update) m : Message ( internalEndDate < d ) then System.out.println( "rule a"); m.setInternalEndDate (d + 10000); * retract (m);* * insert (m);* end > the result is fine : a message every 10. If I replace the rule_a by the rule_b : (because an update should be better than an retract/insert I guess) rule "rule_b" timer (int:1s 1s) when SimpleClock ( d : dateInMillisec != 0 ) // Simple slock give the current time (set by a java timer and an update) m : Message ( internalEndDate < d ) then System.out.println( "rule b"); m.setInternalEndDate (d + 10000); * update (m);* end > the result is bad : a message every 1 second. It act as if the attibute message.internalEndDate wasn't updated in the drools engine. Could someone explain me if/why this behaviour is normal ? Thanks in advance Marc
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
