I found RJ's blog article Polling feature services for "Incremental Updates" helpful and started to explore ways to achieve grouping and summarizing GeoEvents. Outlined below are the basic setup steps to create statistics we can pass into the output. This requires additional server-side scripting and access to a job scheduling tool and Publish Service permissions for ArcGIS Server. Let's first visualize the process.
Step 1 - Setup Input (Feature Service)
Step 2 - Publish a copy of the Feature Service to ArcGIS Server
We did not have access to modify the Feature Class in our environment so we created a local copy on our Server and added a new field 'flag' to separate events that were new from ones that had already been communicated. You could also append a new flag to the existing Feature Class table.
Step 3 - Skip for now, we will come back to this step.
Step 4 - Publish a new Feature Service to ArcGIS Server to hold the notifications to be sent.
In our case, we wanted the notification to include a count of the number of events received in a 24-hour period (COUNT), the state where the event occurred (STATE), and additional location details (RIVERS).
By setting the Delete Polled Features to 'true' this table is guaranteed to contain only notifications that have not yet been sent. GeoEvent will poll the notification table every 60 seconds waiting for records to appear.
Step 5 - Setup the Output
If data is found in Notification table, one email per record (US state) will be sent.
In Step 3, we took it a step further and developed a daily batch process in Python to summarize the number of geoevents (COUNT) and group the location details (RIVERS) so both could be delivered in one email message. Here is the general flow of the script:
Select Event table records where FLAG IS NULL
Store state's rivers in a Python dictionary
Insert one record per state into the Notification table (see table above)
Update Event table FLAG value to 1
This script is scheduled to run daily on a Windows Server using the AutoSys job scheduling tool.