[jboss-jira] [JBoss JIRA] (JBRULES-3161) CEP - event both in and out of time window at the same time

Edson Tirelli (Closed) (JIRA) jira-events at lists.jboss.org
Wed Jan 4 12:34:10 EST 2012


     [ https://issues.jboss.org/browse/JBRULES-3161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edson Tirelli closed JBRULES-3161.
----------------------------------


    
> CEP - event both in and out of time window at the same time
> -----------------------------------------------------------
>
>                 Key: JBRULES-3161
>                 URL: https://issues.jboss.org/browse/JBRULES-3161
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.2.0.Final
>         Environment: jre 6u24, windows 7 x64
>            Reporter: Radai Rosenblatt
>            Assignee: Edson Tirelli
>            Priority: Critical
>         Attachments: droolsbug.zip, illustration.jpg
>
>
> given this object:
> public class Event {
>     private Date started;
>     private Date finished;
>     private long duration;
>     //getters and setters
> }
> the following drools code:
> declare Event
>     @role( event )
>     @duration ( duration )
>     @timestamp( started )
> end
> rule "Event Exists In Window"
> when
>     $eventOne : Event() over window:time( 1h ) from entry-point "Event Stream"
> then
>     //nothing
> end
> rule "No Event Exists In Window"
> when
>     not ( Event() over window:time( 1h ) from entry-point "Event Stream" )
> then
>     //nothing
> end
> and the following scenario:
> [miserable attempt at ascii art replaced by attached image]
> (an event at time T that start at T-1.5h and ends at T+1h)
> both of the above rules fire. im not sure which of them _should_ fire for this scenario, but im pretty sure its either one or the other (to my understanding the conditions are logically exclusive - there either exists an event in the window or there doesnt)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list