laune wrote
Do you really set the pseudo clock to the values in the timestamps?
set the clock
insert the event
fire all rules
Now, if I do:
set the clock
fire all rules
insert the event
i.e., something like this:
nextEventTime = new GregorianCalendar(2011, Calendar.DECEMBER, 6, 12, 10,
0).getTime();
advanceSessionClock(ksession, nextEventTime.getTime());
System.err.println("Firing rules");
ksession.fireAllRules();
System.err.println("Inserting event");
eventStream.insert(new InhibitEvent(nextEventTime));
everything works unexpectedly correctly. It works even when the clock is
updated in one single step (instead of once per second). Doing the three
steps in the sequence you suggested, i.e.
nextEventTime = new GregorianCalendar(2011, Calendar.DECEMBER, 6, 12, 10,
0).getTime();
advanceSessionClock(ksession, nextEventTime.getTime());
System.err.println("Inserting event");
eventStream.insert(new InhibitEvent(nextEventTime));
System.err.println("Firing rules");
ksession.fireAllRules();
never triggers the rule. Have you an idea why this happens?
Does it exists a configuration option that implicitly updates the session
clock with that of the last inserted event if the latter is in the future?
--
MM
--
View this message in context:
http://drools.46999.n3.nabble.com/Sliding-window-behavior-in-stream-mode-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.