Augment the rulebase with metadata

Augment the rulebase with metadata

Custom properties are user-defined properties which provide a means of extending or customizing a rulebase by allowing metadata to be associated with any of the following elements: attributes, controls, entities, folders, relationships, rules, screens and the project.

To set up a custom property you need to:

  1. Specify the custom property definition in Oracle Policy Modeling. Each property can be a given a custom name, default value, data type and can be customized in a number of ways.
  2. Assign a value for the custom property for the element.

Custom properties also require application support in order to work.  

What do you want to do?

Specify a custom property definition

Assign a custom property to an attribute

Assign a custom property to an entity

Assign a custom property to a relationship

Assign a custom property to a rule

Assign a custom property to a screen

Assign a custom property to a control

Assign a custom property to an interview document

Assign a custom property to a folder

Assign a custom property to the project

Implement a custom property using application support

Generate a report of custom properties in a project

Specify a custom property definition

The first step towards setting up a custom property in your rulebase is to specify a custom property definition in Oracle Policy Modeling.

To specify a custom property definition: 

  1. Select File | Project Properties from the main menu.
  2. From the list view, select the type of project element for which you wish to define a custom property definition:



  3. You can define a new definition for the property by clicking the New button. A template will be created for the new custom property.



  4. Specify a Name for the custom property.
  5. Select the Data Type from the drop-down list (Text, Boolean, Number or List).
  6. If you don't want the custom property to be included at runtime, unselect the Make available in Oracle Determinations Engine check box.
  7. If you want to enforce properties to contain at least some value, unselect the Allow blank value check box.
  8. Enter a Default Value for the custom property if required.
  9. Enter Help Text for the custom property if required.
  10. Save your project to ensure that your custom property definitions are saved.

Assign a custom property to an attribute

To assign a custom property to an attribute:

  1. Open the properties file for the project.
  2. Right-click on the attribute and select Edit Attribute from the pop-up menu.
  3. In the Attribute Editor dialog, click the Custom Properties tab.
  4. Your defined attribute custom properties will be displayed in the Custom properties list. Select the property for which you wish to provide a value and enter that value in the right hand text box.



  5. Click OK to apply the change and save the document.

NOTE: You cannot define a custom property directly on a generated attribute. In order to apply a custom property to an attribute, you must have an equivalent publicly named attribute in your properties file and assign the custom property to that attribute.

 

Some examples of how custom properties can be used on attributes are:

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work.

Assign a custom property to an entity

To assign a custom property to an entity:

  1. Open the properties file for the project.
  2. Double-click the entity and in the Edit Entity dialog box, click the Custom Properties tab.
  3. Select the property for which you wish to provide a value and enter that value in the right hand text box.



  4. Click OK to apply the change.

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work. Also, in order for a custom property to be compiled out for an entity, the entity must have a public name.

Assign a custom property to a relationship

To assign a custom property to a relationship:

  1. Open the properties file for the project.
  2. In the Relationships tab for the entity, right-click on the relationship and select Edit Relationship... from the pop-up menu.
  3. In the Relationship Editor dialog box, click the Custom Properties tab.
  4. Select the property for which you wish to provide a value and enter that value in the right hand text box.



  5. Click OK to apply the change.

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work. Also, in order for a custom property to be compiled out for a relationship, the relationship must have a public name.

Assign a custom property to a rule

To assign a custom property to a rule:

  1. In the Project Explorer in Oracle Policy Modeling, double-click on the rules file to open it in Microsoft Word.
  2. Place your cursor at some point in the rule and select the Rule Properties Editor button on the Oracle Policy Modeling toolbar.
  3. Your defined rule custom properties will be displayed in the Custom Properties list in the Rule Properties dialog box.
  4. Select the property for which you wish to provide a value and enter a value in the right-hand text box.



  5. Click OK to apply the change. You will notice that the custom property now appears above your rule conclusion.

rule_property[RuleProperty:this is my property value]

the family is ready to go camping if

the camping equipment has been packed and

everyone is in the car

 

Some examples of how custom properties can be used on rules are:

Note that Oracle Policy Modeling also provides various predefined metadata items for rules.

Assign a custom property to a screen

To assign a custom property to a screen:

  1. Open your screens file and right-click the name of the screen for which you wish to add a custom property value.
  2. Select Custom Properties from the pop-up menu.
  3. In the Custom Properties dialog box, select the appropriate custom property and enter a value into the right-hand text box.



  4. Click OK to apply the change and save your screen document.

 

An example of how custom properties can be used on screens is:

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work.

Assign a custom property to a control

To assign a custom property to a control (screen input):

  1. Open the screen edit window for the screen on which your control is defined.
  2. Switch to the Custom Properties tab.
  3. Select the property for which you wish to provide a value and enter a value in the right-hand text box.



  4. Click OK to apply the change and save your screen document.

 

Some examples of how custom properties can be used on controls are:

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work.

Assign a custom property to an interview document

To assign a custom property to an interview document:

  1. Open your screens file and right-click the name of the interview document for which you wish to add a custom property value.
  2. Select Custom Properties from the pop-up menu.
  3. In the Custom Properties dialog box, select the appropriate custom property and enter a value into the right-hand text box.



  4. Click OK to apply the change and save your screen document.

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work.

Assign a custom property to a folder

To assign a custom property to a folder:

  1. Open the Project Explorer in Oracle Policy Modeling.
  2. Select the folder you want to assign a custom property to. Right-click and select Properties...
  3. Select the property for which you wish to provide a value and enter a value in the right-hand text box.



  4. Click OK to apply the change.

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work.

Assign a custom property to the project

To assign a custom property to a project:

  1. Select File | Project Properties | Common Properties | Custom Project Properties.
  2. Your defined project custom properties will be displayed in the Custom properties list.
  3. Select the property for which you wish to provide a value and enter a value in the right-hand text box.



  4. Click OK to apply the change and save your project.

 

Some examples of how custom properties can be used on the project are:

 

NOTE: Custom property names are case sensitive. If the case does not match the case in the definition then the custom property will not work.

Implement a custom property using application support

The typical process for the implementation of custom properties is:

  1. A requirement is identified that is not met by the standard properties and methods provided by the API (eg information on how to format an attribute value)
  2. Rule developers and application developers agree on a design to meet that requirement that includes one or more custom properties.
  3. Rule developers and application developers agree on the property names and value ranges.
  4. Rule developers define the custom properties and set values for the properties, generally in Oracle Policy Modeling. (The exception is rule custom properties which are set in Microsoft Word).
  5. Application developers write code to query the custom properties at runtime. They need to know the exact names of the properties to query for and the values to expect.
  6. The code does something based on the property value (eg format an attribute value to be title case based on an attribute custom property 'format' having the value 'title_case').

 

TIP: It does not make sense to use custom properties when rules alone can do the work or when they would require replication of logic in the rulebase. Also, it is not advisable to use custom properties when a change is required globally and there is no likelihood in the future of it being changed again.

Generate a report of custom properties in a project

There is a Custom Properties report in Oracle Policy Modeling that you can use to generate a report of some or all of the custom properties used in the project.

To run a Custom Properties report:

  1. In Oracle Policy Modeling, select Reports | Custom Properties. A Custom Property Report Options dialog will be shown.



  2. Select the property types to display. You also have the option to hide items that only have default values from the report.
  3. Click OK to generate the report.