IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows > Implementing custom mediation logic

Migrating a custom mediation primitive

Follow these instructions to migrate your custom mediation primitive's implementation.

In previous versions of IBM Integration Designer, mediation primitives that used custom Java™ code were created in a two stages. A service reference was created in the mediation flow component, and its mediate operation was used to invoke a Java component, which in turn invoked the custom Java code. Starting with IBM Integration Designer 6.0.2, this process is much simpler. Java code is now embedded directly in the custom mediation primitive, without the need for the intermediary service reference and Java component.

Custom mediation primitives created in prior versions will work in IBM Integration Designer 6.0.2, however the only change that you can make to the primitive's properties is to edit the Java or Visual snippet. To upgrade your custom mediation primitive, perform the following tasks:

Follow these steps to upgrade your custom mediation primitive.


Procedure

  1. Select the custom mediation primitive on the canvas to view its properties. In the properties view, click the Details tab. The implementation is set to Java or Visual, and the custom code appears as a snippet in the embedded editor.

  2. Click the Convert to Embedded Snippet button to convert the Java or Visual code to an embedded Java or Visual snippet. Save the changes.

  3. After conversion to a Java or Visual snippet, all the classes in the snippet need to be fully qualified.

    If you see errors in the Java snippet code indicating that an object cannot be resolved or is not a type, use code assist (ctrl-space) to add the package qualifier.

  4. In the top section of the mediation flow editor, delete the service reference used by the old custom mediation primitive, if the reference is no longer used in the mediation flow. Save your changes.

  5. If you deleted the service reference in the mediation flow, you need to synchronize the references in mediation flow component. In the assembly editor, select the mediation flow component, right-click, and select Synchronize Interfaces and References > from Implementation.
  6. Delete the Java component, and save the changes in the assembly editor.

Implementing custom mediation logic