Use constant values in rules

Use constant values in rules

Constant values can be used to set variable attributes in your rules, or in rule comparisons or calculations. There are some formatting and value requirements to keep in mind when writing your rules in Word or Excel, as detailed below.

 

Variable type Format Range Example rule Notes
Number Any number (supports decimals) Approximately 30 significant figures may be used for very small or very large numbers, otherwise approximately 15 can be used. the number of ants on the property = 15,000 Treatment of commas ",", periods "." and spaces " " as decimal and thousand separators are based on the Region settings for the rulebase project. Scientific notation may not be used. There are also considerations in formatting of numeric values in functions.
Currency Any number (supports decimals) Approximately 30 significant figures may be used for very small or very large numbers, otherwise approximately 15 can be used. the person's savings (in dollars) = 534.50 Leading $ and £ symbols may be used if this enhances readability of your rules, however, note that the formatting of attributes values will be determined by the rulebase region setting when the rulebase is run.
Text Any string of alphanumeric characters may be used, enclosed by double quotes ". The limit to the length of a text string depends on Word/Excel and your system, and should not be a practical limitation in your rule authoring. the household's location = "New York"

To enter a double quote character into the text string itself in Word, precede it with a backslash character "\". For example, using the string "the child said \"Hello\"" will produce: the child said "Hello". Double quote characters may be entered directly in Excel and will be treated as entered, except where they surround the entire text string in which case they are ignored.

Date yyyy-MM-dd 0002-01-01 to 9998-12-31 the date of the last interest rate rise = 2007-10-25 Oracle Web Determinations (OWD) has a slightly different range of acceptable dates (0001-01-02 to 9999-09-09). When writing rules to set constant values for date variables, the relevant date range restriction is the Oracle Policy Modeling (OPM) restriction, not the OWD restriction. For example, a rule attempting to set a date variable to the value 9999-01-01 will cause a compile error in OPM, even though OWD can process a date of 9999-01-01 as an input. By contrast, the date 9999-12-31 will cause errors in both OWD and OPM. That is, a rule attempting to set a date variable to the value 9999-12-31 will cause a compile error in OPM, and an attempt to input the date 9999-12-31 will cause an error in OWD.
Time of day hh:mm:ss 00:00:00 to 23:59:59 the store closing time = 17:30:00  
Date and time yyyy-MM-dd hh:mm:ss In the ranges detailed above for date and time values the submission date time = 2009-08-12 17:30:00

Time zones are not varied within the scope of a single rulebase, ie there is a single time zone for a rulebase, which is taken to be that of the server on which it is running. If custom processing is required to handle multiple time zones within a rulebase, a custom function may be implemented to perform this.

 

To see the way Oracle Policy Modeling formats data values in other places such as the debugger or Oracle Web Determinations, see Formatting of variable values.

 

See also: