Developing Apama Applications > EPL Reference > Variables > Variable declarations > Reference-type variable declarations > Context variable declarations
Context variable declarations
Use one of the following constructors to create a context:
context(string name)
context(string name, boolean receivesInput)
ContextVariableDeclaration
ContextInitializer
Rule components
The optional receivesInput Boolean flag controls whether the context is public or private:
*A public context can receive external events on the default channel, which is the empty string ("") as well as events that are sent on channels that the context is subscribed to.
*A private context can receive only those events that are sent on channels that the context is subscribed to. The default is that a context is private.
Example
The following example creates a reference, c, to a private context whose name is test:
context c:=context("test");
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.