[rules-users] drools fusion: rule of type 2 minutes before event A finishes

Maciej Prochniak mpr at touk.pl
Wed Oct 21 04:43:16 EDT 2009


Hello,

I have following use case in drools fusion:

event A has specified duration (different for each occurence)
I would like to fire rule if event B does not happen eventA.endTimestamp
-2minutes.
e.g. event A has duration 20minutes, it's inserted on 13:22:00, then 
rule should fire on 13:40 if event B does not occur before.

I looked on temporal operators - but could not find anything suitable,
it should be sth like:
when 
$eventA
not (EventB( this after[ negative infinity, -2m ] $eventA ) 
then
...
end

- but there's no infinity symbol in drools, nor java ;)

Any ideas?

thanks & br,
maciek




More information about the rules-users mailing list