[rules-users] Not conditional 'not' for event streams?

Edson Tirelli tirelli at post.com
Sun Aug 30 22:58:54 EDT 2009


   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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090830/e1154d12/attachment.html 


More information about the rules-users mailing list