Open topic with navigation
Define a variable to use in a rule
Variables are attributes that can take a range of values (ie not simply true or false). The following variable types are supported in Oracle Policy Modeling:
Variable type |
Example |
Currency |
the annual taxable income |
Number |
the child's age |
Text |
the claimant's name |
Date |
the date of assessment |
Date and time |
the submission date time |
Time of day |
the time of sunrise |
In order for the Oracle Policy Modeling compiler to understand and validate your rules, you must declare all variables before rules using those variables can be compiled.
Variables are declared in a properties file in Oracle Policy Modeling. This allows the variable to be declared once and used across all rule documents. In the event that the variable needs to be altered, it will only be necessary to alter it in the properties file rather than in every document that uses the variable.
Variables can be added to an existing properties file from within Word while writing the rules.
In an interview, variables can be set by the user, set by a data source or inferred.
What do you want to do?
Create a new variable from within a Word document
Create a new variable in an Excel document
Create a new variable in a properties file
Create a new variable from within a Word document
To add a variable to a properties file from within Word:
- Ensure you already have a properties file in your project. If you don't have one, create a new properties file.
- Write your rules using your yet-to-be-declared variable, but before compiling your rules, select the variable text and click the Add Attribute button on the Oracle Policy Modeling toolbar. NOTE: The text of the variable must contain the name of the entity to which it belongs, otherwise it will not be associated with that entity. For more information on naming variables, see Choose non-boolean attribute text.
- In the Add Attribute dialog box, select the Type of attribute (that is, Boolean, Currency, Date, Number, Text, Date and Time or Time of Day) from the drop-down list.

- Select the properties file that you want to add the attribute to from the File drop-down list. Alternatively, you can put the attribute declaration at the top of the
document rather than in a properties file by selecting <Top>.
- If you have chosen to add the attribute to a properties file, enter a Public name for the attribute if required.
(NOTE: All base level attributes and all top level attributes need public names. Important intermediate attributes also need to have public names. For more information, see Set public identifiers for entities and attributes.)
- If you have chosen to add the attribute to a properties file, select the Entity that the attribute belongs to. (NOTE: Usually this will have been automatically determined based on the inclusion of entity text in the attribute text, but if the entity is ambiguous you will need to select the appropriate entity.)
- Click OK.
Create a new variable in an Excel document
To declare a variable directly in an Excel document:
- Open the Declarations worksheet.
- In the Attribute Type column enter the type of variable, and in the Attribute Text column enter the text of the variable.
TIP: If the default Declarations worksheet has been deleted or altered and these columns don't exist, simply enter your attribute type and attribute text in adjacent cells and apply the appropriate Oracle Policy Modeling styles using either the Oracle Policy Modeling menu or the Oracle Policy Modeling toolbar.
Create a new variable in a properties file
To create a variable in a properties file:
- In Oracle Policy Modeling, double click the properties file in the Project Explorer to open it for editing.
- On the Attributes tab, right-click and select New Attribute...
- In the Data type drop-down list, select the type of attribute from the drop-down list.

- In the Text field, enter the variable text.
- Click OK to create your variable.
See also: