[rules-users] when should we the not operator.

arun1979 t91192004 at yahoo.com
Thu Aug 4 12:59:06 EDT 2011


Below is the code

declare EventX
    @role( event )
    @timestamp( eventDate )
    @expires( 2m )
end

rule "test rule"
no-loop
when
    event : EventX(eventType == 'XYZ', $oId :Id)
    not ( EventY(eventType == 'ABC',  Id == $oId, this after[0s,8s] event)) 

then
//fire the rule. code never reaches here if EventY does not occur at all
end


Can someone help me in understanding what i am doing wrong. I tried removing
the not and inserting EventY and it works fine. The eventDate is also
populated for both events.

Thanks

Arun


--
View this message in context: http://drools.46999.n3.nabble.com/when-should-we-the-not-operator-tp3225995p3225995.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list