Apama 10.11.3 | Deploying and Managing Apama Applications | Correlator Utilities Reference | Event file format | Event representation
 
Event representation
A single event is identified by the event type name and the values of all fields as defined by that type. Event type names must be fully-qualified by prefixing the package name into which the corresponding event type was injected, unless the event was injected into the default package.
The specific EPL types and how they map from the event representation are shown in an example in Event types, but there are certain basic types that can be included as shown in the following example:
// integer
MyEvent(-1,1)
 
// decimal and float
MyEvent(-2.0,2.0)
 
// decimal and float in exponential form (0.02,200)
MyEvent(-2.0e-2,2.0e2)
 
// string
MyEvent("three")
 
// boolean
MyEvent(true,false)
Both decimal and float types can be represented in scientific form if required, including when nested in optional or any types and inner events.
A string is a sequence of characters enclosed in double quotes ("). The backslash character (\) is used as an escape character to allow inclusion of special characters such as newlines and horizontal tabs.
To include this character in a string
use this notation
Double quote
\"
This makes sure that the quote is not treated as the end of the string literal.
Newline
\n
Tab
\t
Backslash
\\
Use two backslashes if you want to include a single backslash in the string. The compiler will remove any extra backslashes.
Examples:
MyEvent("Hello, World!")
MyEvent("\ta\tstring\twith\ttabs\tbetween\twords")
MyEvent("a string on\n two lines")
MyEvent("a string with \\ a backslash and a \" quote")
Localization, such as different formats for decimals or quotation marks, is not supported.
Each event is given on a separate line. Only single-line comments are allowed. Start each comment line with // or #. Any blank lines are ignored.
For example, following are three valid events:
// This is an event file that contains some sample events.
// Here are three stock price events:
my.test.StockPrice("XRX",11.1)
my.test.StockPrice("IBM",130.6)
my.test.StockPrice("MSFT",70.5)
For those events, the following event type definition must be injected into the package test:
package my.test;
 
event StockPrice {
string stockSymbol;
float stockValue;
}
If the above events were saved in an .evt file, engine_send would send each event in turn, as soon as the previous event finished transmission. This behavior can optionally be modified in several ways:
*Specifying that batches of events should be sent at specified time intervals.
*Specifying that all events on all queues should be processed before sending the next event.