IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows
Implementing custom mediation logic
Custom mediation primitives allow you to implement your own mediation logic by using Java™ code.
By default, a custom mediation primitive has an input terminal, an output terminal, and a fail terminal. You can add more input and output terminals to the primitive. The input terminals are wired to accept a message and the output and fail terminals are wired to propagate the message. The input message is passed as an input parameter to the Java code. The code is responsible for propagating the output message to the output terminal. If an exception is encountered while executing the Java code, the original message is propagated to the fail terminal, together with any exception information.
- Create Java code in a custom mediation primitive
Create your own mediation logic by embedding a Visual or Java snippet in a custom mediation primitive.- Adding terminals to a custom mediation primitive
Add extra terminals to a custom mediation primitive. Multiple terminals allow you to branch the flow by redirecting messages depending on the custom logic you create.- Defining your own properties in a custom mediation primitive
Define your own properties in a custom mediation primitive. It useful to define your own properties since they are reusable and also promotable so you can configure them at run time.- Controlling the terminal that gets fired
Selecting the terminal to fire your message.- Migrating a custom mediation primitive
Follow these instructions to migrate your custom mediation primitive's implementation.- Tips for creating Custom mediation primitives
A custom mediation primitive allows you to implement your custom Java logic in a mediation flow.