StreamBase supports the use of constants, dynamic variables, and parameters in various places in your EventFlow and StreamSQL modules. These constructions are discussed in the following sections.
-
Using Constants. You can define constants for use in any expression in operators and adapters in a module. In EventFlow programs, define constants in the Definitions tab of the EventFlow Editor. For StreamSQL, use the CREATE CONSTANT statement.
-
Using Dynamic Variables. You can declare dynamic variables that can be referenced by name in expressions in operators and adapters in the containing module. In the declaration, you link each dynamic variable to an input or output stream in the containing module, and the variable's value is updated when a tuple is received on or emitted from the linked stream. Define dynamic variables for EventFlow applications in the Dynamic Variables tab of the EventFlow Editor. For StreamSQL, use the DECLARE statement.
-
Parameter Overview. This section helps distinguish module parameters and global parameters.
-
Using Module Parameters are declared at the module level, and their scope is the containing module. In EventFlow programs, declare module parameters in the Parameters tab of the EventFlow Editor. In StreamSQL programs, declare module parameters with the CREATE PARAMETERS statement. You can reference module parameters in expressions in any operator or adapter in the containing module. You can set values for module parameters in a number of ways.
-
Global parameters are declared in the
<operator-parameters>
section of the server configuration file. They have global scope for all modules running on the StreamBase Server instance configured by that file, and can be referenced in any expression in any module running on the server. You set values for global parameters in the same<operator-parameter>
element that declares them. TIBCO recommends using module parameters over global parameters. -
String Values in Parameters suggests a standard way to pass string values to expression language contexts without using escaped quotes or quotes within quotes.