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
web-determinations.jar- this can be found in the Web Determinations folder 'lib' folder, <web-determinations>\WEB-ING\lib; for example, C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\web-determinations\WEB-INF\lib
determinations-interview-engine.jar*-* this can also be found in the Web Determinations folder 'lib' folder
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:
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.
Determine if the Commentary plugin will use URL redirect, or return HTML content.
Ensure that the Commentary plugin business case addresses the following:
Will the custom Commentary plugin be driven via a datasource? (this works for both URL redirect and HTML content).
Will the custom Commentary plugin be using the standard HTML commentary files generated in Oracle Policy Modeling?
Does the custom Commentary plugin need to access other resources/datasources? such as templates or configuration.
Design how the Commentary plugin:
Will determine if commentary is enabled for a Web Determinations interview.
Checks if commentary data is available for a target commentary item (that is, target screen or control/attribute).
Will access datasources and resources, including transaction integrity processes, fallback on error, and so on.
Development
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