[jboss-jira] [JBoss JIRA] Updated: (JBRULES-2777) rule with window:length/accumulate/not( before ) fires twice
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Sun Sep 25 04:04:33 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-2777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Geoffrey De Smet updated JBRULES-2777:
--------------------------------------
Fix Version/s: 5.3.0.Final
(was: 5.3.0.CR1)
> rule with window:length/accumulate/not( before ) fires twice
> ------------------------------------------------------------
>
> Key: JBRULES-2777
> URL: https://issues.jboss.org/browse/JBRULES-2777
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core
> Affects Versions: 5.1.1.FINAL
> Reporter: Wolfgang Laun
> Assignee: Edson Tirelli
> Fix For: 5.3.0.Final
>
> Attachments: event.tgz
>
>
> STREAM, pseudo-clock, insert facts after advancing the clock to the timestamp in the event:
> for( Job job: jobs.getJobs() ){
> Date jobTime = job.getTimestamp();
> long newClock = jobTime.getTime();
> if( newClock > oldClock ){
> clock.advanceTime( newClock - oldClock, TimeUnit.MILLISECONDS );
> oldClock = newClock;
> }
> System.out.println( "inserting " + job );
> session.insert( job );
> System.out.println( "advancing by 1ms" );
> clock.advanceTime( 1, TimeUnit.MILLISECONDS );
> oldClock++;
> System.out.println( "fireAllRules" );
> session.fireAllRules();
> }
> A single rule:
> declare Job
> @role( event )
> @timestamp( timestamp )
> @duration( duration )
> end
> Part of output:
> inserting Job: 6 at Wed Nov 03 01:40:00 CET 2010 - 1000
> advancing by 1ms
> clock: 1288744799999, ts of 1st: 1288742400000 - Average interval: 599 seconds
> clock: 1288744799999, ts of 1st: 1288743000000 - Average interval: 449 seconds
> fireAllRules
> inserting Job: 7 at Wed Nov 03 01:45:00 CET 2010 - 1000
> advancing by 1ms
> clock: 1288745099999, ts of 1st: 1288743000000 - Average interval: 524 seconds
> clock: 1288745099999, ts of 1st: 1288743600000 - Average interval: 374 seconds
> fireAllRules
> Rule firing is erratic. There is no apparent reason why this should fire twice after advancing the clock.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list