Re: [rules-users] Future events

2012-03-15 Thread Wolfgang Laun
You shouldn't base a streamed CEP application on time stamps dealt out by various systems with clocks that aren't properly synchronized using NTP or whatever. If your data doesn't conform to the very reasonable premises of some system, your application will have to handle that. (You can't tell the

[rules-users] Future events

2012-03-14 Thread lexsoto
Hello: I have this rule: An event is inserted that has a timestamp in the future, the rule is fired. This looks like a bug, because the sliding time window has not yet met the timestamp of the event. I expect the rule to fire not immediately but only when the time reaches the event time. Is

Re: [rules-users] Future events

2012-03-14 Thread Edson Tirelli
An event represents something that already happened (past), so there is no such thing as a future event. You can have a fact that represents something that is scheduled to happen in the future, but that is not an event, and it can change as it is just data. Events are immutable. For

Re: [rules-users] Future events

2012-03-14 Thread Edson Tirelli
The reason is because the engine will not queue up events and wait for the correct time to deal with them. The engine assumes events always represent past times. But for past events, I am sure the window is respected. If you have a rule that counts the number of events in the last 5 hours, an

Re: [rules-users] Future events

2012-03-14 Thread lexsoto
Well, yes that is how the engine works. But should it work this way? Why fire the rule if not in the appropriate time window? This still looks wrong to me, as the intention of the rule is not observed. On the per hand, the engine does queue events in other scenarios, so it seems arbritrary.