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. 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.
Use a date-time constant value
Any date value that you wish to use in Word or Excel rules must be written in the format yyyy-MM-dd. This format is enforced in rule authoring to avoid any ambiguity in the interpretation of date formats across different regions.
Date values may range from 0001-01-01 to 9999-12-31.
For example: the date of the last interest rate rise = 2007-10-25
Any number value may be used. Treatment of commas ",", periods "." and spaces " " as decimal and thousand separators are based on the Region settings for the rulebase project. Approximately 30 significant figures may be used for very small or very large numbers, otherwise approximately 15 can be used. Scientific notation may not be used.
For example (in a rulebase where the region format uses the comma as a thousand separator): the number of ants on the property = 15,000.
There are also considerations in formatting of numeric values.
Any number value may be used as detailed above. 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.
For example (in a rulebase where the region format uses the full stop as a decimal separator): the person's savings (in dollars) = 534.50
Any string of alphanumeric characters may be used, enclosed by double quotes ".
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.
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.
For example: the person's name = "Karla"
Time values written in Word or Excel rules must be in the format hh:mm:ss, and can range from 00:00:00 to 23:59:59.
For example: the specified start time for the employee = 07:47:31
Date-time values written in Word or Excel rules must be in the format yyyy-MM-dd hh:mm:ss, in the ranges detailed above for date and time values.
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.
For example: the submission date time = 2009-08-12 17:30:00
See also: