Create a Document Generator

Create a Document Generator

The following describes the steps specific to creating a Document Generator plugin. For steps on creating and installing a plugin, see 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 Document Generator plugins, see Document Generator plugin.

A custom Document Generator plugin is most commonly needed to:

Assets and information needed

These assets are required to develop a Document Generator plugin (Libraries can be found either in the /lib/ or /bin/ directories of your Web Determinations deployment).

 

The following assets are recommended when developing a Document Generator Plugin.

Steps

Analysis and design:

Before starting on the development of the plugin, read the Document Generator plugin topic.

Once familiarized with the Document Generator plugin, do the following: 

  1. Determine what rulebase (or rulebases) the Document Generator will be registered in. You can make a custom Document Generator plugin that services all the rulebases and its locales in a Web Determinations installation, or you can create the Document Generator plugin to only work for a specific Rulebase, or even only for one of its locales.
  2. Determine the document type (file format) that the Document Generator will provide.
  3. The Document Generator plugin business case should be able to address the following:
    1. Will the plugin use a template to generate the document?
    2. Does the plugin require data other than what is available in the interview session?
    3. Does the plugin need to access datasource/s to retrieve data?
    4. Will the documents generated need to have binary content?

  4. Design how the Document Generator plugin:
    1. will retrieve data that is not available in the interview session (if non-interview data is part of the document).
    2. will access the datasource (if datasource is involved).
    3. will construct and generate a document with non-text content.

Development

  1. Setup the IDE so that it has the Web Determinations libraries and data source libraries. This makes it easier to refer to objects for the Web Determinations or the data source.
  2. Create a document generator plugin class by implementing the DocumentGeneratorPlugin interface (See Document Generator - sample code for examples).
  3. Develop the Document Generator plugin based on the Analysis and design section above.

Install and test

For steps on installing the Document Generator plugin and testing, refer to the topic, Create a plugin.