bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Programming BPM Plug-Ins

Defining Plug-In Online Help

To define plug-in online help, you must perform the following steps:

1. Define the plug-in online help (JavaHelp or HTML) files.

   For example, see the HTML files in the SAMPLES_HOME/integration/samples/bpm_api/htmlhelp/Sample directory.

2. Define the com.bea.wlpi.common.plugin.HelpSetInfo value object, using the constructor defined in HelpSetInfo Object.

   You must specify whether your are defining a JavaHelp or HTML help set using the helpType constructor parameter, and pass the following information using the helpNames constructor parameter, based on whether you are defining a JavaHelp or HTML help set, respectively:

   - JavaHelp help set (.hs) filename and JavaHelp help key

   - HTML help files root directory and HTML filename for the main index page or table of contents

   For more information, see HelpSetInfo Object.

3. Define the com.bea.wlpi.common.plugin.PluginInfo value object, using the constructor defined in PlugInfo Object. You must pass the name of the HelpSetInfo value object, defined in the previous step, as the helpSet constructor parameter value.

The following code listing is an excerpt from the plug-in sample that shows how to define plug-in HTML online help. The code defines a method, createPluginInfo(), that defines a HelpSetInfo value object and, subsequently, a PluginInfo object, passing this HelpSetInfo object. This excerpt is taken from the SamplePluginBean.java file in the SAMPLES_HOME/integration/samples/bpm_api/plugin/src/com/bea/wlpi/tour/po/plugin directory. Notable lines of code are shown in bold.

Listing 8-1 Defining Plug-In HTML Online Help

>     private PluginInfo createPluginInfo(Locale lc) {
>        HelpSetInfo helpSet;
>        PluginInfo pi;
>        SampleBundle bundle = new SampleBundle(lc);
>        String name = bundle.getString("pluginName");
>        String desc = bundle.getString("pluginDesc");
>        String helpName = bundle.getString("helpName");
>        String helpDesc = bundle.getString("helpDesc");
>        helpSet = new HelpSetInfo(
>              SamplePluginConstants.PLUGIN_NAME, helpName, helpDesc,
>              new String[]{ "htmlhelp/Sample", "index" },
>              HelpSetInfo.HELP_HTML);
>        pi = new PluginInfo(SamplePluginConstants.PLUGIN_NAME, name,
>           desc, lc, SamplePluginConstants.VENDOR_NAME,
>           SamplePluginConstants.VENDOR_URL,
>           SamplePluginConstants.PLUGIN_VERSION,
>           SamplePluginConstants.PLUGIN_FRAMEWORK_VERSION,
>           null, null, helpSet);
>        return pi;
>     }

In this example:

- The HTML files, along with any other supporting files must be packaged in a WAR file, for example, sampleplugin.war. The WAR file must be deployed as a WebAppComponent with a Name attribute value of com.bea.wlpi.SamplePlugin. For information about other deployment issues, see Updating the Configuration File.

- The plug-in framework builds a URL to the help set using the htmlhelp/Sample path, which is relative to the value of pluginName. For example: http://localhost:7001/com.bea.wlpi.SamplePlugin/htmlhelp/Sample/index.htm

- The default help page is index.htm.

The following figure illustrates the WebLogic Integration Studio Help menu that includes access to the sample plug-in HTML help set.

Figure 8-1 Plug-In Help Set

The following code listing shows an example of how to define a HelpSetInfo value object for the plug-in JavaHelp help set.

Listing 8-2 Defining Plug-In JavaHelp Online Help

>     javaHelpSet = new HelpSetInfo(SamplePluginConstants.PLUGIN_NAME,
>             "Sample Plugin JavaHelp", "Plugin-provided help set",
>             new String[] {"javahelp/HolidayHistory", "hol_intro"},
>             HelpSetInfo.HELP_JAVA_HELP);

In this example:

- The plug-in framework would build a URL to the help set supplied by this plug-in using the javahelp/HolidayHistory path, which is relative to the value of pluginName. For example: http://localhost:7001/com.bea.wlpi.SamplePlugin/javahelp/HolidayHistory.hs

- The default help topic is hol_intro.

For information about deploying the plug-in online help, see Deploying the Plug-In.