Apama 10.15.2 | Developing Apama Applications | Developing Apama Applications in EPL | Getting Started with Apama EPL | Defining event types
 
Defining event types
 
Allowable event field types
Format for defining event types
Example event type definition
Conceptually, an event is an occurrence of a particular item of interest at a specific time. Examples of events include:
*A price of $100 for a share of IBM stock at noon on November 7, 2014
*Purchase of 1000 shares of IBM stock at $80 per share at 12:01 PM on December 12, 2014
*RFID tag 123-456-789 was scanned at 10:05 AM at loading dock 3
*Purchase order 55555 for 10,000 widgets sent to Acme Motor Supply
*TCP/IP address 123.4.56.789 just accessed server 5
*Container X was overfilled greater than 0.2 grams more than standard amount
An event usually corresponds to a message of some form. The correlator is designed to take in huge numbers of messages per second, and sift them for the events or patterns of events of interest. When the correlator detects interesting events or patterns it can undertake a variety of actions.
A correlator can receive events in several ways:
*You use Software AG Designer to send events from a file.
*From an adapter that receives an event from an external source. Apama adapters translate events from non-Apama format to Apama format.
*You run the Apama engine_send utility to manually send events into the correlator.
*A monitor generates an event within the correlator.
*You can write an application in C, C++, Java, or .NET that uses the Apama client API to send events into the correlator.
The correlator propagates information by sending events.
In EPL, each event is of a specific type. An event type has a name and a particular set of fields. Each field has a name and is one of a selection of types. Every event instance of a given event type has the same set and order of fields. For the correlator to process an event of a specific event type, it needs to have the event type definition for that type. Having the definition for an event type, lets the correlator
*Operate on the messages of that event type
*Create optimal indexing structures for finding events of that type that are of interest
An event type definition specifies the event type's name and the name and type of each of its fields.
See also Specifying named constant values.