Executing Java Classes from a Process

This section describes how to call Java classes from a TIBCO Business Studio process by using a service task.

  1. Create an Eclipse plugin in your workspace that contains code that you want to call as well as any dependencies.
    Note: For more information about creating or importing Java projects, see the Java Development User Guide in the Eclipse documentation.
    Warning: When you use a third party library for your Java projects (which in turn is called from the BPM process) then you should ensure that those third party library/jars are not mentioned on the project classpath (project/runtime/classpath) but they should be mentioned on the manifest file.
  2. Select the Service Task, then on the General tab of the Properties view for the Service Task, select the Java option from the Service Type drop-down list:
  3. Click Select Class. The Select Class dialog is displayed:
    Note: An alternative to selecting the Class is to select a factory to create the Class. To do this, click Select Factory. If a factory is available, selecting it populates the Class and Method fields (if the method is a static method with no arguments).

    Select the appropriate class that you want to use. If you begin typing, the matching classes are displayed. In the previous example, the character s was entered, and all classes starting with s are displayed.

  4. Select from the drop-down list the Method that you want to use. For example:
  5. Click the Scripts tab and add any audit scripts you require Only Initiate scripts are supported.
    Note:
    • You must use a factory static method to instantiate the Plain Old Java Objects (POJO).
    • JavaBeans and arrays are treated as pass by reference. They must also be "true" JavaBeans in terms of public getters and setters.

Java Deployment

A POJO service is embedded in the DAA generated for the TIBCO Business Studio project.