-------------------------------------------------
Release: GeoEvent Server 11.1
Processor: GeoTagger
-------------------------------------------------
What's wrong with the GeoEvent Service below?
Placing any Filter, but especially a spatial filter configured with an Enter or Exit condition, in front of a processor configured to determine Enter or Exit can produce unexpected results if the filter discards an event record the processor needs in order to correctly evaluate its conditional.
Suppose we have two geofences, Hotel_028 and Indigo_045 as illustrated below.
Two locations of a trackable asset, the point locations #1 and #2 on the map, are received and processed through the GeoEvent Service illustrated above. The intent is to capture information about when the vehicle enters and exits either of the geofences. The vehicle's TRACK_ID has never before been reported, so the filters and processors are observing the vehicle's locations for the first time.
Here's the problem:
The fix for this is to rework the event processing on the lower branch to move the filtering operation after the GeoTagger.
Illustrated above I have placed two mutually exclusive attribute filters after the GeoTagger processor. The first filter catches the condition when the processor does not recognize an exiting condition and therefore does not write the name of a geofence into an attribute field named GeoTag. Presumably I want to craft some specific message in this case, so I route the event record through a Field Mapper which places a simple message (as a String) into a field to indicate that the current event record has not exited an area of interest.
The second filter catches the condition when the processor does recognize an exiting condition, because the GeoTag attribute field holds the name of a geofence (its value is not null). Again, I want to craft some specific message for this case, so I route the event record through a Field Mapper to place a simple message into a field to indicate the date/time the current event record exited an area of interest and the name of the area exited.