Apama Documentation : Deploying and Managing Apama Applications : Correlator Utilities Reference : Event file format : Event types
Event types
The following example illustrates how each type is specified in an event representation. Given the event type definitions:
event Nested {
  integer i;
}
event EveryType {
  boolean b;
  integer i;
  float f;
  string s;
  location l;
  sequence<integer> si;
  dictionary<integer, string> dis;
  Nested n;
}
the following is a valid event representation for an EveryType event:
EveryType (
  true,               # boolean is true/false (lower-case)
  -10,                # positive or negative integer
  1.73,               # float
  "foo",              # strings are (double) quoted
  (1.0,1.0,5.0,5.0),  # locations are 4-tuples of float values
  [1,2,3],            # sequences are enclosed in brackets []
  {1:"a",2:"b"},      # dictionaries are enclosed in braces {}
  Nested(1)           # nested events include event type name
)
Note that this example is split over several lines for clarity; in practice this definition would all be written on the same line.
Types can of course be nested to create more complex structures. For example, the following is a valid event field definition:
sequence<dictionary<integer, Nested> >
and the following is a valid representation of a value for this field:
[{1:Nested(1)}, {2:Nested(2)}, {3:Nested(3)}]
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback