About Connect Java rules |
New | Service | Constructor | Method | History | More... |
Use a Connect Java rule to define a connector interface between your Process Commander application and an external Java application or Java class.
Although Process Commander offers various ways to interact with existing Java code, using a Java connector is a best practice in most situations. See Using existing Java code — A comparison of design alternatives for information about design options.
Use the Application Explorer or the Integration slice () to see Connect Java rules in your application. Use the Rules by Type Explorer to list all the Connect Java rules that are available to you.
Typically, use the Connector and Metadata accelerator when building a Java connector. The accelerator uses the Java Reflection API to introspect the class or JavaBean's public constructors and public methods. It then generates the appropriate Process Commander connector, connector activity, class, and property rules. See About the Connector and Metadata accelerator.
If you create a Java connector rule manually, complete the Service tab first. Then, because Process Commander also uses introspection from the connector rule form, you can select the Java methods you want to call with this connector using SmartPrompt.
In both cases — whether you use the Connector and Metadata accelerator or create the rule using the form — the external Java class or .jar file must be on the Process Commander class paths. For instructions, see Pega Developer Network article PRKB-20931 About the Process Commander Class Paths.
To debug your application, you can simulate a Java connector when the external class is unavailable or lacks a test environment. See Creating Connector Simulations.
Connect Java rules belong to the Integration-Connectors category. A Connect Java rule is an instance of the Rule-Connect-Java class.