Developing Apama Applications > Apama EPL Reference > Variables > Specifying named constant values
Specifying named constant values
A constant is a named literal and its value cannot be changed during runtime.
Constant
You can declare an identifier for a constant value in an event type definition or in a monitor. A constant appears in memory once. Spawning a monitor that contains a constant does not make copies of the constant.
The type of a constant must be boolean, decimal, float, integer, or string.
The name you assign to a constant must be unique within the event type or monitor that contains the constant definition.
The literal that you assign to the constant must be the specified type.
When you define a constant event field, you can refer to that constant from outside the event. Qualify the name of the constant with the event name, for example, MyEvent.myConstant.
You cannot declare a constant in an action, directly in a package, or in a custom aggregate function.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.