[rules-users] Agregate function count, the rule doesn't activates.

Nicolás Sanchez sancheznicolas89 at gmail.com
Mon Jun 13 14:01:45 EDT 2011


About the questions you asked, here are the answers:

- Is Event declared properly in the DRL?
Yes, it's been declared properly

- Is the session run properly?
Yes

- Is the insert call correct?
Yes

What I forgot to mention, and excuse me for that omission, is that this
Event is declared inside the DRL file, there is no java class in the
packages. This is the declare I have written:

declare BankEvent
    @role(event)
    @timestamp(callDateTime.getTime())
    @duration(callDuration)      
    userId : String
    sequentialID : long
    transactionID : long
    opCode : long
    amount : int
    callDateTime : Date
    callDuration : long
end

I think the problem is with operator "over window:time(1m)" because if
remove it, 

rule "Too many events in a short period of time"
dialect "mvel"

when
    $user : User()
    Number(intValue > 3) from accumulate($event : Event(userId == $user.id)
from entry-point Event , count($event))
then
    //Java code...
end

the rule fires...

--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-Agregate-function-count-the-rule-doesn-t-activates-tp3059438p3059783.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list