Rule authors can control the values that a user can provide for a variable attribute by using a List control instead of text field input. List controls are drop-down lists, list-boxes, and radio button lists. The simplest way to define the values of a list is via Screen Authoring in Oracle Policy Modeling, where the rule author inputs each selectable option for the list control. While simple, it is not reusable, flexible, or dynamic.
The List Provider plugin is an Engine Session plugin to the Web Determinations Engine which provides an alternate way of populating List controls via Screen Authoring.
A List Provider plugin allows a list to be loaded with values from any datasource. The default List Provider plugin in Web Determinations web application uses xml files to drive lists.
More information on using the default List Provider can be found in Use the default List Provider
List Provider and the Web Determination architecture
Developing a List Provider plugin for your specific project/datasource
The following information details how the List Provider plugin fits into the Web Determinations architecture, and how to use it in the Web Determinations environment.
Web Determinations uses the List Provider plugin every time a List InterviewInputControl object is instantiated in Web Determinations.
A List Provider plugin implements the ListProviderPlugin interface. The ListProviderPlugin interface requires the following when implemented:
Method signature |
Description |
---|---|
List getListOptions( InputInterviewControl controlInstance, InterviewSession session) |
|
This following information explains the various approaches to designing and developing a List Provider plugin for a specific project, rulebase, or datasource.
When designing a List Provider plugin, keep the following in mind:
Essentially, the List Provider plugin needs to have the following functionality:
The List Provider plugin can also use multiple datasources to populate various List controls.
Simple implementations of the List Provider plugin may use simple logic to retrieve and map datasets for each List control it needs to populate. As the complexity increases (multiple datasources, multiple List controls, supporting several rulebases), providing configuration files becomes a necessity to be able to handle changes from the datasource, rulebase, or the List controls.
It is important to understand the two input arguments for the ListProvider method getListOptions.
The InputInterviewControl object is useful for determining what attribute the List control is attached to, which can be used in the Plugin logic to retrieve and setup the dataset for the List control.
The InputInterviewControl object passed in is the object representation of the List control. It contains valuable data about the List control, such as:
The InterviewSession object is useful for determining the current state of the Web Determinations interview such as what instance data has been provided by the user, as well as Web Determinations interview metadata such as the locale and rulebase.
Building the List object is very simple. Here are the general steps to build the List object:
The ListOption object has the following key members: