<HTML dir=ltr><HEAD></HEAD>
<BODY>
<P>Hello, </P>
<P>I have been fighting with this issue for several days, and I just stumbled upon the reason why, but that raised another question for me. </P>
<P>I have a rule checking that two events of the same type do not occur in succession without an event of a specific other type in between them: </P>
<P># If two WorkerInWorkEvents exist for a worker, there must be a WorkerOutOfWorkEvent between them <BR>rule "ERROR: Consecutive WorkerInWorkEvents" <BR> when <BR> $w1 : WorkerInWorkEvent( $workerId : workerId ) <BR> $w2 : WorkerInWorkEvent( workerId == $workerId, this after $w1 ) <BR> not WorkerOutOfWorkEvent( workerId == $workerId, this after $w1, this before $w2 ) <BR> then <BR> errors.add("Two WorkerInWorkEvents without a WorkerOutOfWorkEvent in between (" + $w2 + ")"); <BR> retract( $w2 ); <BR>end </P>
<P>I could see via the log that this file was activating, however it was never firing. The retraction of $w2 should have cancelled other rules' activations, but it wasn't doing so because this rule was never firing. I just discovered a thread (<A href="http://drools.46999.n3.nabble.com/Drools-fusion-and-absence-of-events-td51125.html" target=_blank>http://drools.46999.n3.nabble.com/Drools-fusion-and-absence-of-events-td51125.html</A>) which finally explained to me the reason why: I was running in STREAM mode, and the engine was waiting to see if a WorkerOutOfWorkEvent timestamped between the two WorkerInWorkEvents was going to show up. When I switched to CLOUD mode, the rule fired as expected and my other activations were cancelled as I expected. </P>
<P>Now, my new question is: Since I have not specified any intervals, how long will the engine wait for the WorkerOutOfWorkEvent to show up? Forever? </P>
<P>Thanks in advance for any light you can shed on this. </P>
<P>Mike</P></BODY></HTML>