Guide to Building Business Processes

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

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 Process.java 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 Package Explorer pane, double-click the business process (Process.java file) you want to add the Perform node to.Your business process is displayed in the Design view.
  2. If the Node Palette is not visible in BEA Workshop for WebLogic Platform, choose WindowArrow symbolShow ViewArrow symbolNode Palette from the BEA Workshop for WebLogic Platform menu.
  3. Click Perform in the Node 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.
  4. The Design view is updated to contain the Perform node.

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

    Note: You can select an existing method by clicking on the right side of the Java Method Name field.
  7. Click View Code in the lower left-hand corner of the Perform builder.
  8. The Source view is displayed at the line of code in your Process.java 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   {
    }
  9. Customize this method with your Java code.
  10. Click the Design tab to return to the Design view.
  11. Click Close, to close the node builder.
  12. Your Process.java file is updated to reflect the changes you made in the node builder.

  13. To save your work, select FileArrow symbolSave.

Related Topics

Perform Methods

Handling Exceptions


  Back to Top       Previous  Next