Back Forward About importing JavaBeans with the Connector and Metadata accelerator

Description

Importing a JavaBean with the Connector and Metadata Accelerator helps to implement the Process Commander Java Pages feature. This feature enables you to use rules and the clipboard to interact with Java objects in the same way that you use them to interact with Process Commander class and property rules. The accelerator creates class and Java property rules (properties of mode Java Property or Java Property List) that reflect the data model described in a Java class file.

You start the accelerator and identify the source Java class. The accelerator imports the Java class through introspection and then generates the appropriate class and property rules. It also creates Java wrapper classes that implement the get and set methods from the Java class through the PRObjectWrapper interface of the PublicAPI Clipboard class. The Java wrapper classes provide you with a standard way to access Java objects as clipboard pages from within Process Commander.

For more information about using the Java Pages feature, see the Pega Developer Network document PDNWorking with the Java Pages Feature. For information about the PRObjectWrapper interface, see the PublicAPI JavaDocs topics. SR-4258 B-21903 B-21212 Serializable

Setup

Before you begin, complete the following steps:

  1. Identify the RuleSet and version to contain the generated rules.
  2. (Optional, but recommended) Create or identify an abstract class rule for the accelerator to use as the container or base for the generated items. This class must inherit from the Embed-Java- class. If you do not create the base class before you begin, the accelerator can create one for you.
  3. Review the definition of the class rule you identified to confirm that it allows subclassing and allows rules to be added to the RuleSet you identified.
  4. Make sure the Java class is on both the Process Commander runtime and compile time class paths. For help with this step, see the Pega Developer Network article PRKB-20931 PDNAbout the Process Commander class paths.

Requirements for the Source Java Class

Process Commander uses the JavaBeans coding standard to determine the identities of properties in a Java class. The getter and setter methods for a property must begin with get and set.

The JavaBeans coding standard defines an indexed property as one that has an array value. In Process Commander, that definition includes java.util.List and any of its implementing classes (java.util.ArrayList, for example). However, because list properties are not typed, the source Java class must provide an indexed get method for the property so the data type can be determined. Without an indexed get method for the property, Process Commander does not interpret the property as a list property.

If the source Java class implements the Serializable interface, Process Commander can persist instances of the Java class with other clipboard data. For example, it can save information from the Java object with work objects.

Starting the accelerator

Select > Integration > Overview BYRNB 3/1/10 from the menu to start the accelerator. Under Accelerators, select the Connector and Metadata Accelerator link.

When the accelerator starts you can click the help button (Help) on any form for help about that form.

Up Tools, accelerators, and wizards