I'm trying to have the following working:
rule "userCount"
when
$user : User()
$minutes : Integer()
from accumulate(
MinutesPerUser( user == $user, $time : time)
and Time(this == $time),
sum(1)
)
then
System.out.println( $minutes );
end
but it seems the and Time(this == $user)
part is never true. If I remove that part I get some println output.
What's wrong with the above code?