[rules-users] Odd rules execution for expired events

sopel39 napewnotrafi at gmail.com
Wed Jun 20 07:40:27 EDT 2012


Hi,

I have declared two types:

declare Motion
  @role( event )
  @expires( 5s )
  @timestamp( eventTime )
  eventTime : long
end

declare Recording
end

and following rules:

rule "StartRecording"
  when
    Motion()
    not Recording()
  then
    insert(new Recording())
end

the problem is that when I put a lot of "motions", sleep (so "motions"
become expired) and then do fireAllRules(), I got "StartRecording" executed
multiple times (and not only once), event though Recording is inserted every
time.

It seems that inserting new recording does not cancel expired activations.
Is that correct? How to handle such situation correctly?

--
View this message in context: http://drools.46999.n3.nabble.com/Odd-rules-execution-for-expired-events-tp4018092.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list