Use the default List Provider

Use the default List Provider

The rulebase list provider is intended as an out-of-the-box alternative to the static selectable list options for input controls given through the Oracle Policy Modeling product. It provides the rulebase engineer with the ability to package list files (in a strict XML format organized by Locale) along with the rulebase archive. For each input control that is to take advantage of these deployed list files, the name of the list file (with or without the '.xml' extension) can be provided on the Input Control Editor screen in Oracle Policy Modeling. When an input control with a backing list XML file is to be displayed in Oracle Web Determinations to the user, the XML file is read. If there are any problems with this file (doesn't exist, wrong XML structure, etc.), the static list options are used (if they exist for the input control).

The rulebase list provider expects the list XML files to exist in the *lists/[session locale]* folder in the rulebase archive. The Oracle Policy Modeling Build process also packages the rulebase in the output folder automatically and having the Lists folder in the [Rulebase]/Development/include folder means it's contents will be picked up as well. In this way, multiple localized versions of the same list can be deployed, with the particular one chosen being dependant on the current Oracle Web Determinations session's Locale. The XML files themselves are expected to be in the following format:

 

<list>
     <option text="[list option text]" value="[list option value]" />
     . . .
</list>

Using an XML file to populate a list-type Attribute Input Control in Oracle Policy Modeling

  1. Locate your rulebase project Development folder; the default installation is C:\projects[Rulebase Name]\Development.
  2. Open the include folder (create one if it doesn't exist).
  3. In the include folder, create a new folder called lists.
  4. In the lists folder, create a new folder for each locale that this rulebase supports in Web Determinations, using the locale code; for example, English US is 'en-US', English UK is 'en-GB'.
    1. In most cases, a rulebase running in Web Determinations will support one locale - the rulebase's project language.
    2. The locale code can be derived by using the locale name (for example, the Project Language) and this table - Localization - Locale Codes.
  5. For each locale folder (for example, en-GB for English International)
    1. Create an xml file. The name of the xml file should be related to the list it will be used for; for example, JobIndustry.xml.
    2. In the xml file, add XML nodes as per stated above. For example, to create list options for a Job Industry list input, with Finance and IT as the list options:

      <list>
           <option text="Finance" value="Finance" />

           <option text="IT" value="IT" />

      </list>
    3. Input the above into JobIndustry.xml, and save.
  6. In Oracle Policy Modeling, open the rulebase project open the Screen with the list Attribute Input Control that will use the XML file, and open that Attribute Input (in this example JobIndustry.xml).
  7. Scroll down to Values section in the main (right-side) pane and find the Specify list name label; the Specify list name has a radio button to its left, and a text field on the right.
  8. Tick the radio button for Specify list name as it defaults to 'Speecify selection items'.
  9. In the text field next to Specify list name, enter the XML filename (JobIndustry.xml for this example).
  10. Save the changes to the screen and project.
  11. To check if it has worked, run Build and Run command, and check that the list Input has options that you specified in the XML file.