Developing Apama Applications > Developing Apama Applications in EPL > Getting Started with Apama EPL > Defining event types
Defining event types
Conceptually, an event is an occurrence of a particular item of interest at a specific time. Examples of events include:
*A price of $80 for a share of IBM stock at noon on May 1, 2013
*Purchase of 1000 shares of IBM stock at $80 per share at 12:01 PM on May 1, 2013
*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 Apama Studio 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.
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.