I defined a class which acts as event to the rule engine
It has the following members 1. phone number 2. latitude 3. longitude
How do I formulate a rule wherein 1. The rule counts the number of distinct people in the same location 2. Same person if crossing the same location more than once during a 1 minute interval should be counted only as one and should not be duplicated
I made the below rule but it doesn't seem to be working
import locationbasedservices.LocationEvent;
declare LocationEvent
@role(event)
@expires(1m)
end
rule "footfallcount"
when
LocationEvent ( $msisdn : msisdn )
$footfallcnt : Number(intValue > 0)
from accumulate( LocationEvent(latitude=="77.77", longitude=="77.77",
age>31 && <40, arpu>40.00, gender=="MALE")
from entry-point LocationSvc,
not ArrayList( size >= 2 )
from collect( LocationEvent( msisdn == $msisdn )
from entry-point LocationSvc),
count(1))
then
System.out.println("Footfall: " + $footfallcnt);
end
Can someone help?
Regards Subbu