Run fireAllRules after advancing the pseudo-clock, Check that the
expired event is gone. Then, insert new rules and new facts.
Manually advancing the pseudo-clock requires that the Engine is being
let in on the jump in time and given the chance to react to it.
-W
On 26/06/2013, IK81 <ml(a)kofler.me> wrote:
Dear all,
I am encountering a strange issue that rules fire based on events, which I
already considered as expired. As far as I learned from the documentation
Drools automatically determines the expiration time of an event based on
analyzing the rules (e.g. if there's a temporal operator or aggregation
using the event). Ok, i do not use anything of that. My scenario is as
follows - for testing purposes I use a pseudo session clock and of course
the STREAM mode.
- At time 0 I insert an Event A and call fireAllRules
- Then I advance the time for 100 seconds
- Now I add a further rule by parsing a drl file and adding it to the
Knowledge base of my current session
- Then, still at time 100 I insert another Event B and call fireAllRules
again
The rule that I've inserted previously fires but unfortunately twice. Once
for event A (which I already considered as expired) and for event B (which
is that what I wanted).
Even if i use the @expires annotation in my drl this does not work
correctly. Do I have to call another method to trigger the expiration in
the
session. Any suggestions?
Ingo
p.s. I am using Drools 5.5 final
--
View this message in context:
http://drools.46999.n3.nabble.com/Strange-behaviour-when-adding-rules-dur...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users