Create a Data Adaptor

The following information describes the steps specific to creating a Data Adaptor Plugin. For steps on creating and installing a Plugin, see Create a Plugin. Although it focuses on Java development, the same steps can be followed for .Net (with slight implementation differences).

Assets and Information needed

The following assets are required to develop the Data Adaptor Plugin, or information that will be referred to in the Steps section.

 

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

 

Data Adaptor business case - the reason why the Data Adaptor needs to be implemented for this specific project. There are many reasons, mostly related to integrating data. More info at Data Adaptor - Common Scenarios

 

Datasource - this is the datasource (or datasources) that this Data Adaptor Plugin will connect to to load data, save data, or both. It can be an SQL database, or an API that connects to a datasource; for example, Siebel

 

Datasource library jars - the Datasource may have Java jar library files that is required for the Data Adaptor

 

Datasource connection details - the Data Adaptor Plugin will need to be able to connect to the Datasource, so connection details must be known. This might be a specific server port; for example: //server:portnumber/databasename

Steps

Analysis and Design:

Before starting on the development of the plugin, refer to the Data Adaptor Overview topic for an understanding of how the Data Adaptor is used by Web Determinations, and the various ways load() and save() are called.

Once you have familiarized yourself with the Data Adaptor Plugin, 

  1. Determine what rulebase (or rulebases) the Data Adaptor will work for; you can make a Data Adaptor that services all the rulebases and its locales in the Web Determinations server, or you can create the Data Adaptor to only work for a specific Rulebase, or even only for one of its locales.
  2. From the Data Adaptor business case, establish:
    1. What data in the rulebase can or needs to be loaded from the datasource
    2. What data in the rulebase needs to be saved into the datasource
    3. The datasource and location of the data to be loaded - or where the data is to be saved.
    4. How the save action is to be done during the Web Determinations Interview; saved manually saved by the user, or saved automatically? Is the user allowed to specify the Case ID to use for saving, or is it automatically generated?
    5. How the load action is to be done; will the user be directed to the Web Determinations Interview with data pre-loaded, or is the user allowed to specify which data to load?

  3. Determine how the Data Adaptor will connect and interact with the Datasource, including transaction integrity processes, fallback on error, and so on.
  4. Design the authentication to Data Adaptor methods (load(), save(), listCases()) if needed
  5. Design how the Data Adaptor will access the data and map it to rulebase attributes for load(), and vice versa for save()

Development

  1. Set up 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 Web Determinations or for the Datasource
  2. Start the Data Adaptor Plugin class from the following pseudo code - Data Adaptor - Pseudo Code
  3. Develop the Data Adaptor Plugin based on theAnalysis and Design section

Install and Testing

For steps on installing the Data Adaptor and testing, see  Create a Plugin