Developing Apama Applications > EPL Reference > Variables > Provided variables > self
self
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.
Copyright © 2013-2015 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.