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 © 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.