For "not" and "exists" on anything but a simple pattern, you need to wrap it up in ( ). So, if you are using "from" you need to wrap up:

       not ( AbortedEvent(exchangeId == $se.exchangeId, this after[0s,30s] $se)
               from entry-point "stream" )

   []s
   Edson

2009/8/30 Barry Kaplan <groups1@memelet.com>

I'm trying to formulate a condition like:

       $se : StartEvent()
               from entry-point "stream"

       $fe : FinishedEvent(exchangeId == $se.exchangeId, this after[0s,30s] $se)
               from entry-point "stream"

       not AbortedEvent(exchangeId == $se.exchangeId, this after[0s,30s] $se)
               from entry-point "stream"

A compile error is issued due to the use of 'not' on the last clause. Is
this not supported? Is there another way to obtain this behavior.

Even this simple clause is not value:

       not AbortedEvent()  from entry-point "stream"


----
The corresponding esper for this would be something like:

   select * from pattern [every s=StartEvent ->
       (f=FinishedEvent(exchangeId = s.echangeId) where timer:within(30
sec)
           and not AbortedEvent(exchangeId = s.echangeId) where
timer:within(30 sec)]

--
View this message in context: http://www.nabble.com/Not-conditional-%27not%27-for-event-streams--tp25217095p25217095.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com