Variables in Business Rules
A variable is a temporary data item that is assigned a default value at the start of rules processing. The variable can be modified by rule actions during processing.
Other rules can then use it as a condition for triggering certain actions based on its value. The value of the variable isn’t stored in the database, so it returns to its default value the next time the rules engine begins processing.
Rule variables are useful when you want to accumulate a value and save it conditionally or perform some action based on the accumulated value. A common example of a variable is a score. You can modify a variable based on whether the evaluated object matches rule conditions. Then you can assign different actions based on the variable’s value. For an example of a rule using a variable, see Create a Variable to Measure Service Quality.
See Add or Edit a Variable for the procedure to add or edit a variable.
Variable Data Type | Actions |
---|---|
Integer |
|
Text Field |
See Actions to Set Custom Fields and Variables for information about how leading and trailing spaces are handled when rule actions are used to set variables. |
Date Field |
|
Date/Time |
|