[rules-users] Drools - Repeated Events and Temporal Relations
Gabor Szokoli
szocske at gmail.com
Mon Dec 13 05:37:17 EST 2010
Hi,
I'm just learning Drools, so I could be dead wrong, but it sounds like
you need "reasoning over the the absence of events" just like
advertised here:
http://www.jboss.org/drools/drools-fusion.html#Drools_Fusion_Features
On Mon, Dec 13, 2010 at 9:20 AM, rodih <roded.hess at gmail.com> wrote:
> In more details: I want to fire a rule when an event is inserted for the
> first time (not exist yet) OR when an event is inserted and if and only if
> equal events are already inserted to the working memory BUT the newest of
> them is at least one hour ago old.
rule "process event unless there's a similar one within the hour"
when
$uniqueEvent: Event()
not ( Event(this.similar($uniqueEvent), this before[0, 1h]
$uniqueEvent, this!=$uniqueEvent ) )
then
...
Hope this helps:
Gabor
More information about the rules-users
mailing list