IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows > Reusing mediation logic
Copying part of a mediation flow into a subflow
In the mediation flow editor, you can copy a portion of the mediation flow into a mediation subflow, which can then be re-used in other mediation flows or subflows.
Suppose you want to copy part of an existing flow into another flow, or make part of an existing flow into a reusable artifact. Or, your mediation flow is becoming cluttered, and you want to collapse parts of your mediation flow to get a high level view of the flow.
You can simply select part of the mediation flow and extract it into a subflow:
Procedure
- Open the mediation flow in the mediation flow editor.
- Select the mediation primitives that you want to extract.
- Right click > Copy into New Mediation Subflow
- In the New Mediation Subflow wizard, choose the module or library that will contain the subflow. If you want to share the subflow with other modules, put it in a library.
- In the New Mediation Subflow wizard, enter a name for the subflow.
- Click Finish
- Wire the in and out terminals of the subflow, and complete the wiring.
Example
- Nodes cannot be copied into subflows. If the selection includes nodes that reference operations (such as Input, InputResponse, Callout) the copy action will proceed but these nodes will not be copied. If the selection contains only these primitive, the copy option will not be available.
- In and Out nodes of a subflow may be copied to another subflow, but not to a mediation flow.
What to do next
Now, you can reuse the subflow.
Related concepts:
Mediation subflows
Mediation subflow limitations
Related tasks:
Create a new mediation subflow
Editing a mediation subflow
Adding a mediation subflow in a mediation flow
Use Service Invoke in a subflow
Synchronizing a subflow instance and implementation
Related information:
Promoting properties in a subflow
Changing the input or output message type in a subflow