> ### 6.9 Defining Generic Java Actions

> Generic Java Actions allow you to execute Java business methods that are outside the scope of Interstage BPM. Using Generic Java Actions, you can customize your business processes using methods within autonomous Java classes that you have written and compiled yourself. For a step-by-step example of a Java Action implementation, see "Creating a Template with JavaActions Using the JavaActions GUI" in Chapter 7 of the Interstage Business Process Manager Developer's Guide.

> To define a Generic Java Action:

> 1. Follow the instructions in the Assigning Java Actions section and select Generic JavaActions from the Action List dialog box as shown in the example.

> The Action Properties dialog box appears.

> 2. Type a descriptive name for your Java Action in the Action Name field.

> 3. Click the ... button.

> The Select Java Class dialog box appears.

> 4. Navigate to the class (see Step 1) that you will use for your JavaAction, then click on the class file to highlight it.

> The full path with class name appears in the Path field of the dialog box.

> 5. Check to make sure that you are specifying the correct class, and then click OK.

> The Action Properties dialog box re-appears with the name of your class in the Class Name field, and the path to your class in the Class Path field.

> 6. Select the method that you want to use in your Java Action from the Method Name drop-down list.

> 7. In the Return Value drop-down list, select the UDA that will receive the return value, if any, from your Java Action method.

> 8. Check the UDA Mapping section. Verify that the UDAs are mapped correctly to the method parameters. These UDAs will provide input values to the method. Of course, mapping UDAs to the method parameters requires knowledge of the method that you are calling.

> 9. Click OK.

> Your Java Action appears in the Action frame of the properties dialog where you first clicked the Add button. The figure shows Cal-Salary as an Init Action.

> Figure 101: The Action Set pane

> 10. Click OK to close the properties dialog box.

> Your Generic Java Action is now assigned to the process definition. You can attach actions in any one of the Action type frames.

Business Process Manager Help-Fujitsu Computer Systems Corporation Interstage Website Voice: (888) 248-9273 Interstage BPM Information