WebSphere Lombardi Edition 7.2 > Modeling processes > Advanced modeling tasks > Integrate with other systems > Create outbound integrations


Use the Java Integration component in an Integration service

You should build an Integration service when you want to integrate with an external system to retrieve, update, or insert data in order to complete a task (i.e., outbound integration).

Integration services enable outbound integration. If the implementation for an activity requires calling methods from a Java class, you can use the Java Integration component

Before creating the Integration service, add the JAR file that contains the classes that you need. After you add the JAR file as a server file, you can select the class and method that you want to use for your service. If the JAR files that you need are included in a Lombardi toolkit, you can add a dependency to that toolkit to access those files.

  1. Create an Integration service

  2. Drag a Java Integration component from the palette to the service diagram and then use sequence lines to connect the component to the Start and End Events.

  3. Click on the Java Integration component in the diagram and then click the Definition option in the properties.

  4. Click the Select button next to the Java Class field to choose the JAR file and the class on the JAR file that you want to call.

    The JAR files listed are the ones added as managed server files. By default, the classes in the Lombardi Java package are available in the integration.jar file, which is included in the System Data toolkit. If your current project has dependencies on other toolkits that include JAR files, those files are also available.

  5. Use the drop-down list to choose the method that you want to call on the class that you selected in the preceding step (as shown in the following image):

  6. Enable the Translate JavaBeans check box if you want the result of the Java method that is invoked to be serialized and returned to the Integration service as an XML element. The content of the element is based on the properties of the object's class.

    For example, if you choose the teamworks.Users class from the integration.jar file (Lombardi Java packages) and then select the getUser method with the Translate JavaBeans check box enabled, the result looks like this:

    When you enable the Translate JavaBeans check box, the variable type that you select in the Integration service for the value returned from the Java method should be XMLElement or ANY.

    If you do not enable the Translate JavaBeans check box, the Java method can only return objects of the following types:

    java.lang.String java.lang.Double java.lang.ArrayList
    java.lang.Long java.lang.Float java.lang.HashMap
    java.lang.Integer java.lang.Boolean org.jdom.Document
    java.lang.Short java.lang.Character org.jdom.Element
    java.lang.Byte java.lang.Calendar com.lombardisoftware.core.XMLNodeList and com.lombardisoftware.core.TWObject

  7. Click the Variables tab for the Integration service to add any input variables that the service needs to receive and any output variables that the service needs to make available for subsequent steps in the service or BPD.

  8. Click on the Java Integration component in the service diagram and then click the Data Mapping option in the properties to configure the input and output mappings for the component.

  9. Nest the Integration service in another service or select it as the implementation for an activity, depending on the requirements of the overall process.

Parent topic: Create outbound integrations

+

Search Tips   |   Advanced Search