This section explains the procedure for using generic Java actions.
Prerequisites:
You have implemented a Java class whose methods can be integrated as Generic Java Actions.
The process definition has User Defined Attributes (UDAs) for all parameters that are to be passed to the method.
If the method has a return value, the process definition must have a UDA to which the return value can be assigned.
Note
If you do not add the correct UDAs to your process definition, the Java Action may work unpredictably.
Store the Java class to be independently implemented in the class file format. Java Actions cannot be called for files in the jar file format.
Generic Java Actions allow you to execute Java methods that are outside the scope of Systemwalker Runbook Automation. They enable you to customize process execution using methods of Java classes that you have implemented yourself.
To assign a Generic Java Action:
Copy the Java class that you want to use. You must differentiate whether you are working with a Workflow Application project or a Server project:
Workflow Application project:
In the Workflow Application project's folder structure, store the Java class file(s) to the
Application Classes >> engine >> classes
Server project:
Copy the Java class to the <Systemwalker Runbook Automation Studio Installation Directory>\ibpm\Data\attachments folder.
Click the empty space in the Process Definition editor or select the node to which you want to assign the Java Action, to display the Properties view for the process definition or the node respectively.
Select the Action Set tab. Click Add corresponding to the position where you want to add the Java Action. The Action Type List dialog is displayed.
Double click Generic JavaAction. The Action Properties dialog is displayed.
Type a descriptive name for your Java Action in the Action Name field.
Click the Browse button [...] and select the Java class that you want to use.
Select the method that you want to call from the Method Name list.
Note
A method will be available only if all parameters are available as UDAs and if their data types match.
From the Return Value list, select the UDA that will receive the return value, if any, from the method.
Check the UDA Mapping. Verify that the UDAs are mapped correctly to the method parameters. These UDAs will provide input values to the method. To change a mapping, select another UDA from the drop-down list that appears when you click a UDA.
Figure 11.35 Assigning a Generic Java Action
Click OK.
Note
When you send the process definition to a Management Server, or deploy your Workflow Application project, the generic Java Actions are automatically sent to the Management Server.