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

count in sliding time

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

XMLWordPrintable

      I'm trying to use a sliding time fro count a facts with a condition.
      I'have set a stream mode.
      In test, with pseudo clock active, set this to current Time (it's
      correct?), declare a fact type in drl with

      declare MyFact (i've a javabean)
      @role(event)
      @timestamp(myTimestamp)
      end

      attribute type of myTimestamp must be long or Date? I've tried with both
      but nothing, engine count all fact
      ex: n fact in x days ago from now, the statement over window:time(1s)
      result always n fact. why?
      in when:
      // $o : Order(<condition>)
      $nRic : Number(intValue<maxRic) from accumulate($n: Order(this==$o)
      over window:time(1s),count($n))
      ps. if i set a real clock altough a pseudo, in runTime i've a ClassCastExc. to JdkTimerService
      There is a test suite about count?

            etirelli@redhat.com Edson Tirelli
            ck.frank Francesco Chiarelli (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Archived: