Apama 10.7.2 | Developing Apama Applications | Developing Apama Applications in EPL | Making Application Data Available to Clients
 
Making Application Data Available to Clients
 
Adding the DataView Service bundle to your project
Creating DataView definitions
Deleting DataView definitions
Creating DataView items
Deleting DataView items
Updating DataView items
Looking up field positions
Using multiple correlators
DataViews are an Apama abstraction that allows an application to present a read-only view onto some of their data for easy consumption by external clients that use Apama's Scenario Service API (see Scenario Service API), such as Dashboard Builder dashboards.
External clients using the Scenario Service can be notified when instances are added and deleted, and when the outputs of a specific instance change. However, they cannot create, delete or edit instances themselves, as DataViews are read-only views and instance management is under the control of the application.
This topic is about the DataView Service, which provides an EPL API for creating/deleting/updating DataView definitions, instances and instance outputs such that they can be consumed by Scenario Service clients. The DataView Service is not the only way Apama exposes DataViews to the Scenario Service. MemoryStore tables, for example, can be configured to expose their rows as DataView instances (see Exposing in-memory or persistent data as DataViews).
The DataView Service uses two central concepts:
*DataView definition
A DataView definition specifies a unique DataView name, a set of field names and field types (each type is one of string, decimal, float, integer, and boolean), and optionally a set of key fields.
*DataView item
Each DataView item is associated with a DataView definition, and specifies values for the defined fields.
Note:
The topics below briefly describe the event types that are used for managing the DataView definitions and items. For detailed information on the fields that are available for these events, see the com.apama.dataview package in the API Reference for EPL (ApamaDoc) .
Note that a DataView definition is not intended to serve as a central data structure for your application, but rather is intended merely to expose your application's data to remote client applications.
The programming interface is defined by the DataViewService_Interface.mon file in the monitors directory of your Apama installation directory. It defines the API for working with DataView definitions and DataView items.
Using the DataView Service, you can create DataViews in only the main context. You cannot create them in any contexts you create.
Metadata properties can be specified for a DataView by adding keys with the prefix DataViewDefinition.EXTRA_PARAMS_METADATA_PREFIX to the extraParams dictionary of DataViewAddDefinition when adding the new DataView definition.