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

Collect + Sliding Window not working properly

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

    XMLWordPrintable

Details

    Description

      Collect is not working properly when operating over a sliding window, like:

      package org.drools;

      import java.util.List

      global List timeResults;
      global List lengthResults;

      declare OrderEvent
      @role( event )
      @expires( 2m )
      end

      rule "collect with time window"
      when
      $list : List( empty == false ) from collect(
      $o : OrderEvent() over window:time(30s) )
      then
      timeResults.add( $list.size() );
      end

      rule "collect with length window"
      when
      $list : List( empty == false ) from collect(
      $o : OrderEvent() over window:length(3) )
      then
      lengthResults.add( $list.size() );
      end

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty