[rules-users] drools-[slidingTimeCount]

Edson Tirelli tirelli at post.com
Tue Aug 25 17:52:52 EDT 2009


   This works. I have integration tests for it. So it must be some subtle
difference.

   Can you open a JIRA and attach a test case showing the problem you are
having plz?

   Thanks,
      Edson

2009/8/25 Francesco Chiarelli <chiarelli.francesco at gmail.com>

> Hi!
> 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
> Thanks in advance.
> *Francesco*
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090825/3b48f7af/attachment.html 


More information about the rules-users mailing list