Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3564

Sliding window filters not applied correctly

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      REPORTED BY WOLFGANG
      --------------------------------

      It should be pretty obvious that the rule should not fire after the
      insertion of a single fact.

      Sample.drl
      declare MyEvent
      @role(event)
      end
      
      rule FaultsCoincide
      when
         f1 : MyEvent( key == "type1" ) over window:length( 1 )
         f2 : MyEvent( key == "type2" ) over window:length( 1 )
      then
         System.out.println( ">>> f1=" + f1 + " f2=" + f2 );
         if( f2.getKey().equals( "type1" ) ) System.out.println( "*** BUG ***" );
      end
      insert MyEvent<type1,ALARM>
      >>> f1=MyEvent<type1,ALARM> f2=MyEvent<type1,ALARM>
      *** BUG ***
      insert MyEvent<type2,ALARM>
      >>> f1=MyEvent<type2,ALARM> f2=MyEvent<type2,ALARM>
      >>> f1=MyEvent<type2,ALARM> f2=MyEvent<type1,ALARM>
      *** BUG ***

              etirelli@redhat.com Edson Tirelli
              etirelli@redhat.com Edson Tirelli
              Archiver:
              rhn-support-ceverson Clark Everson

                Created:
                Updated:
                Resolved:
                Archived: