I am using WSO2 CEP 4.1.0 version for real time event processing and I am writing a execution plan for checking whether my inputted geocoordinates are within a polygon. But getting an error : 'within' is neither a function extension nor an aggregated attribute extension in execution plan "ExecutionPlan11"
My execution plan is below and please help me in solving this error.
/* Enter a unique ExecutionPlan */ @Plan:name('ExecutionPlan11')
@Import('NewInputStream:1.0.0') define stream instream (meta_sourceId string, meta_engOilTemp float, meta_engFuelRate float, meta_acceleratorPedalPos float, meta_engSpeed float, meta_barometricPressure float, meta_receivedTime long, meta_latitude double, meta_longitude double);
@Export('NewOutputStream:1.0.0') define stream outstream (meta_sourceId string, meta_alarmName string, meta_alarmMessage string, meta_alarmAttribute string, meta_data string, meta_unit string, meta_pointId string, meta_pointName string, meta_deviceId string, meta_receivedTime long);
from instream[geo:within(meta_latitude, meta_longitude,"{'type':'Polygon','coordinates':[[[12.52,77.32],[12.89,77.69],[13.011,77.686],[13.058,77.555],[12.9284,77.4421]]]}" == false)]
select meta_sourceId, "Geofencing Alarm" as meta_alarmName, "Out of geo range" as meta_alarmMessage, "geofence" as meta_alarmAttribute, "NA" as meta_data, "NA" as meta_unit, "Latitude" as meta_pointId, "longitude" as meta_pointName, "D1" as meta_deviceId, meta_receivedTime insert into outstream;