Vous êtes sur la page 1sur 38

NOTE: The ArcGIS GeoEvent Processor team updates the product tutorials frequently to reflect the latest version

of the software. Depending on


the product version you are using, there may be inconsistencies between your environment and illustrations or specific steps in the exercises. The
concepts outlined in the exercises, however, should be applicable across product versions.

Introduction to GeoEvent Processor Module 2

GEP 10.2.x / Rev B

Introduction to ArcGIS GeoEvent Processor Module 2


Introduction & Module 2 Overview .............................................................................................................. 3
Objectives for Module 2 ........................................................................................................................... 3
Getting started .......................................................................................................................................... 3
Working with Features and Feature Services ............................................................................................... 4
Register ArcGIS Servers managed database ............................................................................................ 5
Publish a feature service to ArcGIS Server................................................................................................ 9
Create web maps .................................................................................................................................... 13
Create an operation view in Operations Dashboard for ArcGIS. ............................................................ 18
Making Features Come Alive ...................................................................................................................... 22
Examine an updated feature services REST endpoint ........................................................................... 33
Use the Operations Dashboard for ArcGIS to view feature updates ...................................................... 36
Congratulations! ......................................................................................................................................... 38

Introduction to GeoEvent Processor Module 2

March 2014

Page 2 of 38

Introduction & Module 2 Overview


The Introduction to GeoEvent Processor tutorial the first in a series of tutorials developed to introduce
the many different capabilities of ArcGIS GeoEvent Processor for Server has been divided into five
separate modules. The scope and material covered in each module is described in Module 1.
The modules in this tutorial were designed to complement one another by presenting different functional
areas of the product and exploring the functionality through exercises. While exercises in later modules do
not generally require you to complete the exercises from the previous modules, you are encouraged to
work through the Introduction to GeoEvent Processor tutorial beginning with Module 1 and continuing
through Module 5. This is especially true for exercises in Module 5 in which readers can expect the
narrative and illustrations in an exercise to replace some of the step-by-step instruction presented in
earlier modules.
At the start of each module, and occasionally within a module, a GeoEvent Processor configuration will be
referenced which can be imported to update and/or create configurable items such as inputs, outputs,
GeoEvent Definitions, and/or GeoEvent Services. Carefully review the notes which identify what the
GeoEvent Processor configuration contains, as it may update or reset items you created and modified as
part of a previous exercise or product exploration you have completed on your own.
Module 2 includes exercises which illustrate how GeoEvent Processor can be used to update the data in
a feature class that was published as a feature service. Several prerequisite exercises are included in this
module for setting up a managed enterprise geodatabase in ArcGIS for Server, publishing feature
services from map packages, and creating web maps. This module also includes an introduction to using
Operations Dashboard for ArcGIS to visualize real-time data.

Objectives for Module 2


Once you have completed the exercises in this tutorial you should be able to:

Import a GeoEvent Processor configuration containing existing components such as inputs,


outputs, GeoEvent Definitions, and GeoEvent Services.

Register and explore the reasoning behind using a managed database as your preferred data
store for features in ArcGIS for Server.

Use a map package to publish a feature service to an ArcGIS for Server site.

Use ArcGIS Online to create web maps by adding layers from published feature services.

Configure GeoEvent Services to append and update features in a published feature service.

Use the Operations Dashboard for ArcGIS to visualize real-time data.

Getting started
If you are just getting started with this tutorial, a GeoEvent Processor configuration file is included to
help you quickly get started with the exercises in this module. Importing this product configuration will
Introduction to GeoEvent Processor Module 2

March 2014

Page 3 of 38

create the items listed below if items with the same names already exist, importing the product
configuration will update them and overwrite any changes you may have made in a previous module.
Module 2 GeoEvent Processor Quick Start Configuration contents:

An input named tcp-text-in and two outputs named tcp-text-out and file-out.

A GeoEvent Service named Flights which incorporates the input and outputs.

Two registered system folder data stores named GeoEvent_Input and GeoEvent_Output.

A registered instance of ArcGIS for Server named LOCALHOST_AGS.

If items with these names already exist, importing the provided product configuration will overwrite
them. Any changes you may have made to the items listed above, outside of the steps outlined in the
Module 1, will be lost. The system folder data stores assume that C:\GeoEvent\input and
C:\GeoEvent\output exist as local folders on your system. The server data store assumes ArcGIS for
Server has been installed on the localhost and is reachable at http://localhost:6080/arcgis/.
Follow the steps below to import the GeoEvent Processor configuration for Module 2.
1. In GeoEvent Processor Manager, navigate to Site > GeoEvent Processor > Configuration Store.
2. Click Import Configuration and browse to Module2_QuickStart.xml file located in the
\configurations folder included with this tutorial.
3. Select the Module2_QuickStart.xml file and click Import to import the configuration.

Working with Features and Feature Services


The exercises in this module build upon the work you completed in Module 1. If you imported the
GeoEvent Processor configuration in the Getting Started section above, you have what you need to
proceed.
The purpose of the first few exercises in this module is to prepare your environment so GeoEvent
Processor can update features in a published feature service. You will first configure ArcGIS for Server
and register a managed database this will enable the Feature Access capability when you publish a
map package as a feature service.
You will also design a series of web maps as part of this module. The web maps will include feature
layers from features services you published to your local ArcGIS for Server site. In order to fully
complete the exercises in this module you will need an ArcGIS Online for Organizations account. You can
sign-up for a 30-day free trial of ArcGIS Online for Organizations by visiting www.arcgis.com.
If you prefer not to work with ArcGIS Online for Organizations, you will still be able to add features to a
local ArcGIS for Server feature service and visualize the data using a public web map, but you will not be
able to use the Operations Dashboard for ArcGIS a WPF application developed specifically for displaying
dynamic web map content.
Introduction to GeoEvent Processor Module 2

March 2014

Page 4 of 38

Register ArcGIS Servers managed database


Before you publish the feature services identified in the next exercise, you will need an enterprise
geodatabase into which the feature services data can reside. The installation, setup, and configuration of
a database server are topics too large to adequately cover in this tutorial, so the steps outlined in this
exercise will focus on what is needed in order to configure GeoEvent Processor to support the exercises.
Links to available online help topics will be provided for additional information.
Before continuing, check your ArcGIS for Server site to determine you already have a managed database.
If not, you will need to register an enterprise geodatabase as the sites managed geodatabase in order to
complete the exercises.
Note: If you are an experienced site administrator, you may choose to skip the steps in this exercise in
favor of tailoring the map presented in the next exercise to use data you copy into an available
enterprise geodatabase already registered with your ArcGIS for Server site.
1. In a web browser, open ArcGIS Server Manager at http://localhost:6080/arcgis/manager.
Note: This is the manager for ArcGIS for Server, not the GeoEvent Processor Manager. You may need to
obtain login credentials from your site administrator in order to login to the ArcGIS Server
Manager.
2. Navigate to Site > GIS Server > Data Store.
3. If a Managed enterprise geodatabase exists, you can skip to the next exercise; otherwise continue
with the steps below to register a managed database.

What is an enterprise geodatabase? An ArcGIS enterprise geodatabase is a collection of geographic

datasets of various types held in a multiuser relational database management system, or RDBMS.
Examples include Oracle, Microsoft SQL Server, PostgreSQL, Informix, and IBM DB2.

Introduction to GeoEvent Processor Module 2

March 2014

Page 5 of 38

RDBMSs come in many variations and scale to support single-users accessing geodatabases built on files
on up to larger workgroup, department, and enterprise geodatabases accessed by many users.
How do I create an Enterprise Geodatabase? The help topic Create Enterprise Geodatabase discusses the

geoprocessing tool used to create an enterprise geodatabase within an RDBMS. For help installing and
configuring an RDBMS, from your vendor of choice, please refer to the vendors documentation.
Additional help is available at ArcGIS Resources for:

Installing SQL Server Express

Administering enterprise geodatabases

Registering ArcGIS Server's Managed Database

Copying data to the server automatically when publishing

Once you have created an enterprise geodatabase on your database server you will need to create a
connection to the geodatabase from ArcGIS for Desktop. Follow the steps below.
4. Launch ArcCatalog.
For installations of SQL Server Express:
a. Expand Database Servers and double-click Add Database Server.
b. Specify the database server and instance of SQL Server Express and click OK.

c. Expand the newly created database server connection to list the servers available
geodatabases.
d. Right-click the database server containing the enterprise geodatabase you intend to use with
GeoEvent Processor and select Permissions (refer to the screenshot on the next page).
e. Make sure the user which runs the ArcGIS for Server service has sufficient permissions to
create, update, and delete tables by making that user a Server administrator.

Introduction to GeoEvent Processor Module 2

March 2014

Page 6 of 38

Beneath the database server, right-click the geodatabase you intend to use with GeoEvent
Processor and select Save Connection. This will create an entry beneath Database
Connections that you will need when registering the database with ArcGIS for Server as the
servers managed database in the next set of steps.
For installations other than SQL Server Express such as Oracle or SQL Server Enterprise:
a. Expand Database Connections and double-click Add Database Connection.
b. Specify the information required by your RDBMS.
- For SQL Server, this is typically <server host>\<instance> and <database> using operating
system authentication.
- For Oracle, this is typically <instance> followed by the user credentials of a database
authenticated user.
For additional information refer to Database connections in ArcGIS for Desktop.
Once you have created an ArcGIS for Desktop connection to the enterprise geodatabase you intend to
use with GeoEvent Processor, you need to register that database as ArcGIS Servers Managed Database.
This is necessary in order to follow the exercise steps as written, which instruct you to enable the
Feature Access capability as part of service publication. Data included in the local map package will
automatically be copied into the enterprise geodatabase when the map is published with the feature
service configured to reference the published copy of the data.
5. In a web browser, open ArcGIS Server Manager and navigate to the Site > GIS Server > Data Store.
6. Click the pull-down next to Registered Databases and choose Register Managed Database.

Introduction to GeoEvent Processor Module 2

March 2014

Page 7 of 38

7. Enter a descriptive name for the registered database. It is recommended the hostname of the server
on which you installed your RDBMS be incorporated into this name.
8. Click Import.
9. Click Choose File and browse to the *.sde file for the database connection created previously.
(A *.sde file was created when you established the database connection in ArcCatalog).
In Windows, this database connection file is typically found in the users applications data folder:
C:\Users\...\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog

10. Select the *.sde file associated with the connection to your enterprise database and click Open.
11. Click Import on the Register Database dialog.
12. Click Create on the Register Database dialog to register the database as managed.
13. Click Validate All to validate your registered database.
14. Verify the new registered database is Managed.

Introduction to GeoEvent Processor Module 2

March 2014

Page 8 of 38

Publish a feature service to ArcGIS Server


ArcGIS map packages (.mpk) are an easy way for map authors to provide map content and layer
symbology to a map service publisher. The exercise prerequisite steps below illustrate how to publish
feature services from the included map packages. You will need to publish several different feature
services in order to complete various exercises in this tutorial.
The exercise steps to follow refer to the Flights.mpk map package. You will use this map package to
publish a Flights feature service which contains a single feature layer (also named Flights) that is
necessary for the Making Features Come Alive section below. Additional map packages, necessary for
later exercises, are also found in the \data folder included with this tutorial.

Note: You will need to repeat the steps below to publish the other map packages referenced above
(Storms.mpk, Pilots.mpk, and IncidentDetection.mpk) as separate feature services in order to
complete exercises in the other modules of this tutorial.
1. In Windows File Explorer, browse to the \data\WorkingWithFeatures folder included with this
tutorial.
2. Double-click the Flights.mpk map package.
ArcMap will open automatically and display the map package contents. The contents of the map
package will be unpacked to your user \My Documents\ArcGIS\Packages folder.
3. In ArcMap, click File and choose Share As > Service.
4. Click Next to publish a service.

Introduction to GeoEvent Processor Module 2

March 2014

Page 9 of 38

5. From the drop-down menu, choose an available connection to your local ArcGIS Server (or click the
Create Server Connection button to create a new server connection).
6. Click Next to accept the default service name Flights.

7. Choose a folder in which you want to create the feature service and click Continue.
Note: It is recommended, but not necessary, you specify the services be created in a folder named
IntroToGEP to maintain consistency with illustrations in the following exercises.

Introduction to GeoEvent Processor Module 2

March 2014

Page 10 of 38

The Service Editor dialog will open allowing you to configure the service to be published.
8. In the Service Editor menu, click Capabilities and uncheck the checkbox for KML and check the
checkbox for Feature Access.

9. Click Publish to publish the feature service.


Note: If you encounter an error message when publishing which states the Feature Service requires a
registered database, revisit the instructions in the Register ArcGIS Servers Managed Database
section above. You will need to re-register your enterprise database.
Two dialogs will appear, the first indicates the service is being analyzed and the second that the Flights
dataset will be copied to the server. This is necessary to support the feature access capability you
configured above.

10. Click OK when prompted to copy the data to the server.


Publishing the service may take a couple of minutes. When finished you should see a confirmation
message, similar to the one illustrated above, stating the service was published successfully.
Introduction to GeoEvent Processor Module 2

March 2014

Page 11 of 38

It is recommended you repeat the steps above to publish the other three map packages as separate
feature services. These map services will be referenced below in this module as well as in later modules
where you will use them to build web maps.
11. Close ArcMap once all four feature services are published.
You can confirm all four are published in ArcGIS Server Manager and the ArcGIS REST Services Directory
as illustrated below.

Introduction to GeoEvent Processor Module 2

March 2014

Page 12 of 38

Create web maps


A data publisher might choose to query a feature service through its REST endpoint to review updates
made to the services features. You will have an opportunity to practice this in a later exercise in this
module. Generally, users will want to visualize the features on a map.
For feature visualization, this tutorial will use the Operations Dashboard for ArcGIS a WPF application
developed for displaying dynamic content available on ArcGIS Online.
In order to use the Operations Dashboard, you must first create a web map and include the web map in
an operation view. This prerequisite exercise will walk you through building the web maps. In the next
exercise you will incorporate these web maps into an operation view.
Web maps and operation views are created and shared through an ArcGIS Online for Organizations
account. A 30-day free trial of ArcGIS Online for Organizations is available on arcgis.com.
Below is an overview of the operation views, web maps, and feature layers used in the Introduction to
GeoEvent Processor tutorial:

Working with Features and Feature Services


o

Operation View:

Flight Monitor

Web Map:

Flights

Feature Layer(s):

Flights

Working with Filters

( Module 2 )

( Module 3 )

Operation View:

Flight Monitor

Web Map:

Flights

Feature Layer(s):

Flights, Storms

Working with Processors

Introduction to GeoEvent Processor Module 2

( Module 4 )
March 2014

Page 13 of 38

Operation View:

Incident Detection

Web Map:

Incident Monitor

Feature Layer(s):

Trucks, TruckAlerts, Depots

Follow the steps below to build the web maps necessary to support the section exercises.
1. Open a web browser and navigate to http://www.arcgis.com/.
2. Sign in using your ArcGIS Online for Organizations account and navigate to My Content.

3. Click the Create Map button to create a new web map. Your organizations default basemap will
open.

4. Click

and choose Add Layer from Web.

5. Enter the URL for a published feature service.


Obtain the feature service URL from ArcGIS Server Manager.
Introduction to GeoEvent Processor Module 2

March 2014

Page 14 of 38

Open ArcGIS Server Manager.

Navigate to Services > Manage Services and click the IntroToGEP folder.

Click

Select Capabilities and ensure the Feature Access checkbox is checked.

Select and copy the REST URL that is displayed.

next to the Flights feature service to review the properties.

6. In ArcGIS Online, paste the URL to the URL property in the Add Layer from Web dialog as illustrated
below.
Note: Make sure you add the layer index with the URL. Again, using the Flights feature service as an
example, the services only feature layer is at index 0, so you will add /0 to the URL you copied as
illustrated below. This will specify the specific layer you want to add to the web map from the
feature service.

Introduction to GeoEvent Processor Module 2

March 2014

Page 15 of 38

Note: If your ArcGIS Server site is not hosted on the machine localhost, you will need to modify the URL
to include your ArcGIS Server site machines hostname.
7. Click ADD LAYER to add the layer to your web map.
Occasionally, you may see a message when adding layers to a web map from a local ArcGIS Server site (or opening
a map in the ArcGIS Online map viewer) stating that layers on an internal network are not accessible and editing
will be disabled for those layers. You will not be editing the layers through the map viewer for these exercises; you
will be configuring GeoEvent Processor to append and update features through the feature services REST
endpoints. These warning messages can be ignored.

Initially, you will not see any data when adding the feature layer to the web map because the Flights
feature layer does not have any features you are publishing what amounts to a container in which
features will be created using event data sent by GeoEvent Processor.
8. Click Save

to save your new web map and enter the map information as illustrated below.

9. Click SAVE MAP.


10. Hover you mouse over Home

and from the drop-down click My Content.

11. Verify the Flights web map is now listed. Notice it has not yet been shared.

Introduction to GeoEvent Processor Module 2

March 2014

Page 16 of 38

In addition to the Flights web map, you will need a web map to support the Detecting Incidents section
exercises in Module 5 that utilizes the Incident Detection Processor.
Using the steps you just completed above as a guide:

Create a new web map. You may change the basemap if you like; the Streets basemap would be
appropriate for the exercises.

Add the three layers (Depots, Trucks, and TruckAlerts) found in the IncidentDetection feature
service to the new web map as layers.

Organize the layers such that TruckAlerts is the first, Trucks is the second, and Depots is last (refer
to the illustration below) using URLs below.
o

http://localhost:6080/arcgis/rest/services/IntroToGEP/IncidentDetection/FeatureServer/2

http://localhost:6080/arcgis/rest/services/IntroToGEP/IncidentDetection/FeatureServer/1

http://localhost:6080/arcgis/rest/services/IntroToGEP/IncidentDetection/FeatureServer/0

Introduction to GeoEvent Processor Module 2

March 2014

Page 17 of 38

Save your web map and title it Incident Monitor. Enter any appropriate tag(s) and summary for
this web map.

Create an operation view in Operations Dashboard for ArcGIS.


The Operations Dashboard for ArcGIS provides an organization a way to monitor activities and events,
track your field workforce, and assess the status and performance of your daily operations. You can
create and share operation views that include maps, lists, charts, gauges, and more based on live
geographic data defined in a web map or web service.
Download and install the Operations Dashboard for ArcGIS from the link above. Follow the exercise
steps below to add the web maps prepared in the previous exercise to the operation views.
Note: The Operations Dashboard can be configured to work with Portal for ArcGIS on premise in
addition to using hosted services and configurations from ArcGIS Online for Organizations.

1. From the Windows Start menu, open the Operations Dashboard.

Introduction to GeoEvent Processor Module 2

March 2014

Page 18 of 38

2. Login using your ArcGIS Online for Organizations account.


3. Click Create a New Operation View.

4. Select Multi-display operation view and click Create.

Introduction to GeoEvent Processor Module 2

March 2014

Page 19 of 38

5. Select the Map widget and click OK to add it to the operation view.

6. Navigate to the Flights web map created in the previous exercise and click Open.

7. From the Data Sources tab, check the checkbox next to the Flights feature layer and select Dynamic
to designate Flights as a layer which can update.
8. Click the Capabilities tab and add the capabilities you want to enable for the Flights map widget as
illustrated below.

Introduction to GeoEvent Processor Module 2

March 2014

Page 20 of 38

Note: You must specify Dynamic or Static for every layer participating in a map widget. Flight data, for
example, will be dynamic it will update dynamically as GeoEvent Processor sends new events to
it. An established operational boundary (like one you will use in the Detecting Incidents section
later in this tutorial) will be static. If GeoEvent Processor were receiving polyline data
representing storm fronts, that layer would likely need to be dynamic as well.
9. Click OK to save the Flights map widget.
Operations Dashboard has a default map widget refresh interval of 30 seconds. For these exercises, you
will change the refresh interval so data will be updated more frequently using the steps below.
10. From the Operations Dashboard main menu, click WIDGETS and choose Data Sources.
11. On the Data Sources dialog box, click Modify.
12. Change the Refresh interval to 1 second and click Update.
13. Click Close to dismiss the Data Sources dialog.
14. Click FILE on the main menu and click Save As and enter Flight Monitor for the map title.
15. Click Save to save the operation view.
In your ArcGIS Online for Organizations account, if you refresh the My Content page, you will see a new
operation view called Flight Monitor.

Introduction to GeoEvent Processor Module 2

March 2014

Page 21 of 38

Before starting the Detecting Incidents section exercises found in Module 5, you will need to create an
operation view for the Incident Monitor web map.
When configuring the map widget for this second operation view, make sure both the Trucks and
TruckAlerts layers are set to Dynamic these are the layers whose feature data will be updated as
GeoEvent Processor sends the vehicle event data to them. The Depots layer provides the operational
boundary, which will be Static and will not be updated.
Congratulations! You are now ready to make your features come alive.

Making Features Come Alive


In this exercise you will use GeoEvent Processor Manager to create a new GeoEvent Service, simulate an
event stream with GeoEvent Simulator, and observe how GeoEvent Processor is used to update features
in a feature service.
An important part of working with feature services in GeoEvent Processor is to correctly establish your
GeoEvent Definitions. GeoEvent Definitions must match exactly a feature services schema or event data
sent from GeoEvent Processor cannot be used to update the feature services features.
In the last module, you configured the tcp-text-in Input Connector to create a GeoEvent Definition based
on the data it discovered. You might recall seeing the Flight GeoEvent Definition in GeoEvent Processor
Manager.

Introduction to GeoEvent Processor Module 2

March 2014

Page 22 of 38

Notice in the illustration above the different fields are generically named Field1, Field4, Field5, and so
on. When dealing with simple comma separated text received over a TCP socket, GeoEvent Processor is
not told what the field names are so it examines the data and assigns a data type. If the attribute field
name and data type in the GeoEvent Definition do not match those of a target feature services layer,
the data provided by GeoEvent Processor will be rejected by ArcGIS for Server and the feature layer will
not be updated.
Follow the steps below to import a GeoEvent Definition from the Flights feature service which exactly
matches the Flights feature layer schema.
1. In GeoEvent Processor Manager, navigate to Site > GeoEvent Processor > GeoEvent Definitions.
2. Click Import GeoEvent Definitions and specify the properties illustrated below.

If the Flights feature service has been published as described in the previous exercise, you should
be able to use the pull downs to select the IntroToGEP service folder, Flights feature service, and
Flights layer.

You should use the ArcGIS for Server connection you registered which incorporates your servers
actual hostname. The localhost pseudonym illustrated below will work, but it is recommended
you avoid using the pseudonym to make your workflow self-documenting.

3. Click Import to import a GeoEvent Definition matching the schema of the specified feature layer.
Introduction to GeoEvent Processor Module 2

March 2014

Page 23 of 38

Notice a new GeoEvent Definition named Flights (with an s) was added to the list of GeoEvent
Definitions. The GeoEvent Definition was named for the Flights feature layer in the published feature
service. If you still have the Flight (with no s) GeoEvent Definition created in Module 1, go ahead and
delete it, you will not need it going forward.
4. Click

to edit the Flights GeoEvent Definition you just imported.

5. Click

to edit the FlightNumber fields properties.

6. Add the TRACK_ID tag to list of Added Tags using the arrow buttons and click Save.

7. Click Save to save the updates made to the Flights GeoEvent Definition.
A field tag is a marker or key applied to a field that GeoEvent Processor can use to identify how specific
fields should be used or handled. By tagging the FlightNumber field with the TRACK_ID tag, you are
Introduction to GeoEvent Processor Module 2

March 2014

Page 24 of 38

telling GeoEvent Processor that this field contains an identifier which can be used to uniquely identify
features when using this GeoEvent Definition to update a feature service.
Note: When updating a feature service, you must have a field tagged TRACK_ID.
You now need a GeoEvent Definition which matches the input you expect to receive. It is important to
note that the schema of inbound events does not necessarily need to match the schema of outbound
events. In fact, you can probably expect that the two will often not match. In many cases, you will most
likely have little or no influence over the format of the inbound streaming data and unless you are the
publisher of the feature service, you may have just as little influence over the schema of the feature layer
you want to update.
Proceed with the steps outlined below to create a new GeoEvent Definition which will match the input
you will be simulating for this exercise.
8. Click

to copy the Flights GeoEvent Definition. The GeoEvent Definition properties appear.

9. Name the new GeoEvent Definition Flights-TcpTextIn as illustrated below.


10. Click New Field to add a field named Longitude of type Double and click Create.
11. Add another new field named Latitude of type Double and click Create.
12. Click Reorder Fields and use the arrow buttons to move the shape field to the last field in the list
and click Save.
Notice the FlightNumber field is already tagged with the TRACK_ID since you copied this new GeoEvent
Definition from the GeoEvent Definition you edited previously.
13. Compare the new Flights-TcpTextIn GeoEvent Definition with the illustration below.

Introduction to GeoEvent Processor Module 2

March 2014

Page 25 of 38

14. Click Save to save the new GeoEvent Definition.


You should now have two GeoEvent Definitions, Flights and Flights-TcpTextIn, listed on the GeoEvent
Definitions page as illustrated below.

Now with GeoEvent Definitions for both your expected input data and intended output feature layer,
you can update the tcp-text-in Input Connector and reconfigure it to use a specific GeoEvent Definition
rather than having the input create a GeoEvent Definition for you.
Proceed with the steps below to update the tcp-text-in Input Connector.
15. In GeoEvent Processor Manager, navigate to Services > Inputs.
16. Click

to edit the tcp-text-in Input Connector.

17. Specify the properties below.

Change the Incoming Data Contains GeoEvent Definition property to No.

Change the Create Fixed GeoEvent Definitions property to No.

Select the GeoEvent Definition named: Flights-TcpTextIn.

Change the Build Geometry From Fields property to Yes.

Specify the X Geometry Field should be taken from the events Longitude field.

Specify the Y Geometry Field should be taken from the events Latitude field.

Introduction to GeoEvent Processor Module 2

March 2014

Page 26 of 38

18. Click Save to save your edits to the tcp-text-in Input Connector.
Later in this exercise you will be simulating event data which looks like the following:

Comparing the illustration above with the input you reconfigured, you will notice this version of the
simulation data does not include the name of a GeoEvent Definition. You reconfigured the input to
reflect this, and also to not attempt to create a GeoEvent Definition, but rather use a specified GeoEvent
Definition tailored specifically for the expected format of the inbound event data.
Another important update made to the inputs configuration was to specify that a geometry should be
created using attribute data from each received event. Notice in the illustration above the coordinate
values are no longer expressed as a quoted string. The Flights-TcpTextIn GeoEvent Definition was edited
to specify that a longitude and latitude value would be provided in each event in separate fields. The
input will use these values to construct a geometry, which will be placed in a field named shape.
Before creating an Output Connector to update the feature layer, lets update the GeoEvent Service and
verify the Input Connector and GeoEvent Definition you created are functioning properly.
19. In GeoEvent Processor Manager, navigate to Services > GeoEvent Services.
Introduction to GeoEvent Processor Module 2

March 2014

Page 27 of 38

20. Click

to edit the Flights GeoEvent Service.

21. Delete the file-out Output Connector from the GeoEvent Service and click Publish to publish the
reconfigured GeoEvent Service.

22. Double-click TCP Console application desktop shortcut (created in Module 1) to launch the
application used to monitor data sent to a TCP socket from GeoEvent Processor.

23. Open the GeoEvent Simulator and configure the properties below:

Click Load File and browse to the FeatureFlights.csv file in the \simulations folder included
with this tutorial.

Leave the Time Field # property set to field 1 and click Load.

Check the Set value to Current Time checkbox to simulate real-time data.

Uncheck the Continuous Loop checkbox.

Click Click to Connect to establish your server connection.

Introduction to GeoEvent Processor Module 2

March 2014

Page 28 of 38

For more information on configuring the GeoEvent Simulator, refer to exercise in Module 1.
24. Click Step

once to simulate a flight data event.

In the TCP Console application you should see a new event was received from GeoEvent Processor.

Notice the output in the TCP Console identifies the name of the GeoEvent Definition used to interpret the
event data (Flights-TcpTextIn) and that the constructed geometry, represented as a quoted list of
coordinates x, y, z, has been appended to the event following the Longitude and Latitude values.
This event schema does not match the schema of the target feature services layer for one, the layer
does not contain fields for a separate Longitude and Latitude. A quick edit to the GeoEvent Service will
fix this. You will be examining GeoEvent processor elements in more detail beginning in Module 4. For
now, follow the steps below to add a Field Mapper Processor to your Flights GeoEvent Service.
25. In GeoEvent Processor Manager, edit the Flights GeoEvent Service and delete the line connecting
the tcp-text-in and tcp-text-out connectors.

Introduction to GeoEvent Processor Module 2

March 2014

Page 29 of 38

26. Double-click Processor from the menu to add a new processor to the canvas and configure the
properties as illustrated below.

27. Click OK to create the new Field Mapper Processor.


28. Modify the Flights GeoEvent Service to reflect the illustration below and click Publish.

29. In GeoEvent Simulator click Step

once to send a data event.

You should see a second event appear in the TCP Console application this time it is using the Flights
GeoEvent Definition. The event should include the constructed geometry, represented as a quoted list of
coordinates, but should not include the Longitude and Latitude values from the original event data.

Now that you have tested your GeoEvent Service and observed that the output appears to match the
schema of the feature layer you want to update, you can create a new Output Connector and
incorporate it into your GeoEvent Service.
30. In GeoEvent Processor Manager, navigate to Services > Outputs and click Add Output.
Introduction to GeoEvent Processor Module 2

March 2014

Page 30 of 38

31. Enter the search keyword feature in the search box and click Search.
32. Click the Select button to choose the Update a Feature Output Connector.
33. Specify the properties below for the new Output Connector.

The Name of the new output should be fs-out.

Choose your registered ArcGIS Server connection.

The Folder property is the IntroToGEP folder.

The Service Name is the published Flights feature services Flights feature layer.

The Unique Feature Identifier Field property should be FlightNumber.

And the Update Interval (seconds) property should be set to 1.

34. Click Save to save your new Output Connector.


Proceed with the steps below to incorporate your new output into your Flights GeoEvent Service.
35. In GeoEvent Processor Manager, navigate to Services > GeoEvent Services.
36. Click

to edit the Flights GeoEvent Service.

37. Double-click the fs-out Output Connector in the menu to add it to the canvas.
38. Modify the Flights GeoEvent Service to reflect what is illustrated below and click Publish.

Introduction to GeoEvent Processor Module 2

March 2014

Page 31 of 38

39. In the GeoEvent Simulator, click Step

once to send a data event.

You should see another event posted to the TCP Console application, but this time, you will need to dig a
little deeper to confirm the event data was used to create a new feature.
40. In GeoEvent Processor Manager, navigate to Services > Monitor and review the count of events
sent In and Out of each of the components.

By publishing your most recent changes to the Flights GeoEvent Service, you cleared the services
counts. You then sent an event, which the service received, processed, and sent to two separate outputs
(this is why the Out count shows 2 events while the In count indicates only 1 event was received).
The fs-out Output Connector indicates it has received an event but you do not know that ArcGIS for
Server actually created a feature without accessing the feature services REST endpoint and querying to
see if the previously empty layer has a new feature.

Introduction to GeoEvent Processor Module 2

March 2014

Page 32 of 38

Examine an updated feature services REST endpoint


In the previous exercise, you imported a new GeoEvent Definition to match a feature layers schema,
then copied and edited the GeoEvent Definition to create a second GeoEvent Definition which matched
the expected format of your inbound event data. You reconfigured an Input Connector to use the
appropriate GeoEvent Definition and updated it for your expected input. You then created and
configured a new Output Connector to updated feature layers and incorporated the output into a
GeoEvent Service.
You then used the GeoEvent Simulator to send event data to GeoEvent Processor and explored the
Monitor page in GeoEvent Processor Manager to review the event counts as the different components
were edited and published.
In this exercise you will send more events to GeoEvent Processor and observe the updates to the feature
service by querying the services REST endpoint to display its feature data.
1. From the Windows Start menu, open the Services Directory.

2. In the ArcGIS REST Services Directory click the IntroToGEP folder.

Introduction to GeoEvent Processor Module 2

March 2014

Page 33 of 38

3. Click the IntroToGEP/Flights (Feature Server) service.

4. Click the Flights (0) layer.

5. At the bottom of the layers page, click Query.

Introduction to GeoEvent Processor Module 2

March 2014

Page 34 of 38

6. On the Query: Flights (ID: 0) page enter the values specified below.

Where:

1=1

(no spaces)

Out Fields:

(wildcard indicating all fields should be shown)

7. Click Query (GET).


The page should refresh and below the query inputs table should be a list of the features currently in the
feature layer.

Notice, one record was returned since you were sending event data from the GeoEvent Simulator one at
a time.
8. In the GeoEvent Simulator, configure
the rate to send 9 messages every
1000 milliseconds.

Introduction to GeoEvent Processor Module 2

March 2014

Page 35 of 38

9. Click Clear sent events info and Go to


Start as illustrated to the right to
reset the simulation to the beginning
of the FlightData.csv file.

10. Click Step


once to send a second
batch of event data to GeoEvent
Processor.
11. On the Query: Flights (ID: 0) page, click the Query (GET) button to refresh your query.
Observe that the layer now has 9 records. Each time you send a batch of events to GeoEvent Processor
from the GeoEvent Simulator you should see the attribute values in these 9 records update. This is how a
data publisher might go about verifying a GeoEvent Service that updates features in a feature service is
working as intended.
In the next exercise you will use the Operations Dashboard for ArcGIS to visualize the flight data.

Use the Operations Dashboard for ArcGIS to view feature updates


While using a feature services REST endpoint to query for feature updates provides a reliable way to
debug a workflow and ensure that features are being updated it is not as user-friendly as actually
seeing the features update on a map in real-time.
In this exercise you will use an operation view that leverages a web map which displays features from
the Flights feature service. If you do not already have a Flight Monitor operation view in your ArcGIS
Online for Organizations account, you will need to complete the steps outlined above in the Create an
operation view in Operations Dashboard for ArcGIS section before you can complete the following
exercise.
1. Open the Operations Dashboard and login using your ArcGIS Online for Organizations account.
2. Double-click to open the Flight Monitor operation view.

Introduction to GeoEvent Processor Module 2

March 2014

Page 36 of 38

You should see a map of your published Flights web map with any features you sent to GeoEvent
Processor from the GeoEvent Simulator as you worked through the exercises above.
3. Position the Operational Dashboard on your desktop so you can see both it and the GeoEvent
Simulator.
4. In GeoEvent Simulator, click Step
Processor.

once to send another batch of event data to GeoEvent

If the Flights operation view, you will see the positions of each flight update as you send new batches of
event data to GeoEvent Processor.
5. Click Play

and watch the web map update as a new batches of event data is sent every second.

The GeoEvent Simulator should be configured to stop once it has reached the end of the data in the
simulation file, after nine batches or 81 total flight events have been sent. You can click on any feature
in the Operations Dashboard to display its attributes in a pop-up window as illustrated below.

Introduction to GeoEvent Processor Module 2

March 2014

Page 37 of 38

6. Click Stop and close the GeoEvent Simulator.

Congratulations!
By completing the exercises in this module you learned how to make features come alive using
GeoEvent Processor and you have explored a number of prerequisites necessary to make this happen.
Updating a feature service requires the feature service support the Feature Access capability, which
requires the data behind the feature services layers be in an enterprise geodatabase. You reviewed how
to publish a feature service using a provided map package and how using a Managed Database will copy
the data from the map package to an enterprise geodatabase so that feature access can be enabled. You
also reviewed how web maps, created in ArcGIS Online, can be used to visualize data hosted on a local
ArcGIS for Server site and how the Operations Dashboard for ArcGIS can be used to visualize data in
real-time.
In Module 3 you will work through exercises to show you how to work with filters in GeoEvent
Processor. Filters can be used to isolate events of particular interest based on attribute values in the
event or the events spatial proximity to a GeoFence.

Introduction to GeoEvent Processor Module 2

March 2014

Page 38 of 38

Vous aimerez peut-être aussi