Apama Documentation : Developing Apama Applications : Developing Apama Applications in Event Modeler : Overview of Using Event Modeler : About scenario variables : Variable constraints
Variable constraints
Depending on its type, each variable can also have value constraints set on it.
Variable constraints only apply to dashboards. That is, they only apply when a variable is presented to, and is interacted with by, an end user of the scenario. By design, variable constraints do not apply to scenario rules or variable wiring within the Variables tab.
For Text variables the possible constraints are:
*Minimum length: a whole number specifying the minimum acceptable length of the text string. Setting this constraint is optional.
For example, if set to 5, then “book” would not be valid, but “library” would.
*Maximum length: a whole number specifying the maximum acceptable length of the text string. Setting this constraint is optional.
For example, if set to 8, “library” would be a valid value, but “librarian” would not.
*One of All Upper Case, All Lower Case or Mixed Case. One of these constraints must be set, Mixed Case being set by default.
For example, if set to All Upper Case, “test” and “Test” would be invalid, but “TEST” would be fine. Conversely, only “test” would have been valid if set to All Lower Case, but all three variants would be fine with the default Mixed Case setting.
*Trim Whitespace: If enabled, all leading and trailing white space characters (space, tabs, new line and other formatting characters) will be removed from the text string whenever its value is set. Note that if the minimum length and maximum length constraints were set, they would apply to the final ‘trimmed' text string. The default is for this constraint to be disabled.
For example, “ Hello World ” would be automatically changed to “Hello World” if Trim Whitespace were enabled.
For Number variables the possible constraints are:
*Minimum: a number specifying the minimum acceptable value of the variable. Setting this constraint is optional.
For example, if set to 2 or 2.0, then only numeric values greater than or equal to 2.0 would be valid.
*Maximum: a number specifying the maximum acceptable value of the variable. Setting this constraint is optional.
For example, if set to 5 or 5.0, then only numeric values less than or equal to 5.0 would be valid.
*Whole Number: If enabled, all values set for this variable will be changed to whole numbers by being rounded down. The default is for this setting to be disabled.
For example, 3.1 would be automatically changed to 3, as would 3.9736., while -3.1 would be changed to -4.
For Choice variables, the constraints specify the set of valid text values that this variable can take. These are distinct values, and choice variables can only take the values specified in their constraints.
For example, the choice variable Day should have its constraints set to the set of values “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday” and “Sunday”.
No constraints are available for True/False (condition) variables.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback