Apama 10.7.2 | Developing Apama Applications | Developing Apama Applications in EPL | Getting Started with Apama EPL | Defining event types | Example event type definition
 
Example event type definition
For example, the EPL definition of an event type for simple financial stock price ticks might include the stock's name and its price:
event StockTick {
   string name;
   float price;
}
To represent a specific instance of an event, use the following form:
event_type (field1_value, field2_value ...)
For example, a StockTick event describing Acme's new price of 55.20 looks like this:
StockTick("ACME", 55.20)
The reading order of fields in an event type definition and in instances of that event type must always match and is always left-to-right and then top-to-bottom. That is, "ACME" is the value of the name field and 55.20 is the value of the price field.