Create a Commentary Plugin

Create a Commentary Plugin

The following describes the steps specific to creating a Commentary plugin. For steps on creating and installing plugins in general, refer to Create a Plugin. Although this topic focuses on Java development, the same steps can be followed, for the most part, for .Net.

For more information about Commentary plugins, refer to the topic, Commentary Plugin

A common need for a custom Commentary plugin is to drive commentary data from a datasource, and custom logic to process commentary data before being displayed. A custom Commentary plugin can also use the Commentary HTML files, but perform additional processing to the HTML contents before display.

Assets and information needed

The following assets are required to develop a Commentary plugin; additionally they may be referred to in the Steps section below:

Web Determinations library jars

 

Java IDE -  this is the Java development application you are using. While this is optional, it will make it much easier when referring to objects in the web-determinations.jar and determinations-interview-engine.jar files.

 

Commentary plugin business case - this is the reason/need why the custom Commentary plugin is being developed.

Steps

Analysis and design:

Before starting on the development of the plugin, it is recommended that you read the Commentary plugin topic.

Once familiarized with the Commentary plugin, do the following:

  1. Determine what rulebase (or rulebases) the Commentary will be registered in. You can make a custom Commentary plugin that services all the rulebases and its locales in the Web Determinations installation, or you can create the Commentary plugin to work only for a specific rulebase, or even only for one of its locales.
  2. Determine if the Commentary plugin will use URL redirect, or return HTML content.
  3. Ensure that the Commentary plugin business case addresses the following:
    1. Will the custom Commentary plugin be driven via a datasource? (this works for both URL redirect and HTML content).
    2. Will the custom Commentary plugin be using the standard HTML commentary files generated in Oracle Policy Modeling?
    3. Does the custom Commentary plugin need to access other resources/datasources? such as templates or configuration.

  4. Design how the Commentary plugin:
    1. Will determine if commentary is enabled for a Web Determinations interview.
    2. Checks if commentary data is available for a target commentary item (that is, target screen or control/attribute).
    3. Will access datasources and resources, including transaction integrity processes, fallback on error, and so on.

Development

  1. Setup the Java IDE so that it has the Web Determinations library jars and Datasource library jars. This makes it easier to refer to objects for the Web Determinations or the datasource
  2. Start the Commentary plugin class from the following pseudo code - Commentary - pseudo code
  3. Develop the Commentary plugin based on the Analysis and design section above.

Install and test

For steps on installing and testing the Commentary plugin, see Create a plugin.