Although the NOW concept may seem simple at first, it is not, because it is ambiguous and depends on the different semantics that it can adopt based on the work environment. Drools Fusion has the concept of "NOW" when you start it in STREAM mode , but it is different from what you set above. The explanation here is a little longer, so let's focus on your problem.
Firstly, you say: “I am trying to write a rule that delays the shooting ...”, and then your opinion: “I am not looking for a deferral of shooting according to the rules ...”, so I am confused by what you need.
If you want to defer a rule, you can use the timer attribute:
rule X timer( int: 15m ) ...
If you want to run the rule in case the event happened or did not happen during the interval, you can use sliding windows. For example:.
rule "Event did not happen in the last 15m" when not( SomeEvent() over time:window(15m) ) ...
Hope this helps. And BTW, try posting your questions to the Drools mailing list as it will be easier for you to get an answer. I only saw your post because a friend asked me about it.
Cheers, Edson
Edson tirelli
source share