Writing Custom Java Code in Perform Nodes

Although users are free to modify and write custom Java code almost anywhere, Perform nodes provide a means for visually representing custom code within the process diagram. When you add a Perform node to your business process, a method is created in the JPD file. You subsequently customize the method signature in the Source View.

This section describes how to create and customize a Perform node for your business process.

To Create a Perform Node in Your Business Process

  1. On the Application tab, click the business process (JPD file) you want to add the Perform node to.
  2. Your business process is displayed in the Design View.

  3. If the Palette is not visible in WebLogic Workshop, choose View —> Windows —> Palette from the WebLogic Workshop menu.
  4. Click image Perform in the Palette. Then drag and drop the Perform node onto the business process in the Design View, placing it on the business process at the point in your business process at which you want to create custom Java code.
  5. The Design View is updated to contain the Perform node.

  6. Double-click the Perform node in the Design View to open the node builder.
  7. This node builder allows you to name the node and the associated Java method.

    Note: You can select an existing method by clicking image on the right side of the Java Method Name field.

  8. Click View Code in the lower right-hand corner of the Perform builder.
  9. The Source View is displayed at the line of code in your JPD file at which the Java method is written.

    For example, if you created a method named checkInventory, the following code is written to the source file.

    public void checkInventory() throws Exception   {
    }  
    
  10. Customize this method with your Java code.
  11. Click the Design View tab to return to the Design View.
  12. Click the X in the top right-hand corner to close the node builder.
  13. Your JPD file is updated to reflect the changes you made in the node builder.

  14. To save your work, select File —> Save.

Related Topics

Perform Methods

Handling Exceptions

Previous Document Next Document