[jboss-jira] [JBoss JIRA] (JBRULES-3521) accumulation function ignores conditions in 5.4.0.Final

Mario Fusco (JIRA) jira-events at lists.jboss.org
Fri Aug 17 09:55:15 EDT 2012


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

Mario Fusco resolved JBRULES-3521.
----------------------------------

    Fix Version/s: 5.4.1.Final
                   5.5.0.Beta1
       Resolution: Duplicate Issue


Duplicate of JBRULES-3564
                
> accumulation function ignores conditions in 5.4.0.Final
> -------------------------------------------------------
>
>                 Key: JBRULES-3521
>                 URL: https://issues.jboss.org/browse/JBRULES-3521
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler (fusion)
>    Affects Versions: 5.4.0.Final
>         Environment: windows 7 x64, tested with jdk 6 and 7
>            Reporter: Radai Rosenblatt
>            Assignee: Mario Fusco
>             Fix For: 5.4.1.Final, 5.5.0.Beta1
>
>         Attachments: accumulationBug.zip
>
>
> given this drl:
> {code:title=average.drl|borderStyle=solid}
> package playground
> import playground.datamodel.EventObject
> declare EventObject
>     @role( event )
> end
> rule "new event under average"
> when
>     $latestEvent : EventObject(level == "Full", status == "success", $size : size ) from entry-point "Event Stream"
>     Number($averageSize : doubleValue, doubleValue > ($size)) from accumulate( EventObject(level=="Full", this before $latestEvent, status == "success", $bSize : size ) over window:time( 5d ) from entry-point "Event Stream" , average($bSize))
> then
>     System.err.println("new event under 5d average");
> end
> {code}
> and the following sequence of 3 events:
> {Full,success,100},{Whatever,fail,0},{Full,success,99}
> the 3rd event should trigger a firing. the complete breakdown of events should be as follows:
> 1. 1st event is inserted, average is 0 because there are no previous events - no firing.
> 2. 2nd event is inserted - does not match the conditions and therefore should not be accumulated.
> 3. 3rd event is inserted - accumulation should only consider the 1st event, hence the avg. is 100. the event value is 99, which is below the avg - rule should fire.
> this works with drools 5.1.1 but fails in 5.4.0.Final - in 5.4 the 2nd event is acounted by the average function and so the rule does not fire.
> attached is a complete maven project to recreate this bug - simply unzip and run "mvn clean install" to recreate.
> also in the mvn project attached, simply change the drools.version property in the pom.xml from 5.4.0.Final to 5.1.1 (already in there, just commented out) to verify this works in 5.1.1

--
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