self
Purpose
The predefined variable self is an event reference that can be used to refer to an event instance within the event’s definition.
Within an event action body, you can use the self variable to refer an event instance of that event type. In other words, the scope of self is each action body in the event definition. For example:
event Circle
{
float radius;
location position;
action area () returns float
{
return (float.PI * radius * radius);
}
action circumference () returns float
{
return (2.0 * float.PI * self.radius);
}
}
Note: You cannot use the self variable in an Apama query.