This documentation is for WSO2 ESB version 4.5.0. View documentation for the latest release.

Adding a Mediation Sequence

Sequences can be created as named sequences and referred later from other parts of the ESB configuration. Some configurations expect sequences to be defined in the place they are used. We call this type of sequences "in-line sequences."

A sequence editor is used in both cases for creating a sequence. Adding a sequence in the WSO2 ESB Management Console is equivalent to directly specifying the mediators of the sequence within the <definitions> element.

Follow the instructions below to add a new sequence in the ESB Management Console.

1. Sign In. Enter your user name and password to log on to the ESB Management Console.

2. Click on "Main" in the left menu to access the "Manage" menu.

3. In the "Manage" menu, click "Sequences" under "Service Bus."

4. Click on the "Add Sequence" link.

5. The "Design Sequence" page appears.

6. Specify the sequence name before adding mediators.

7. Optionally, add the "On Error" sequence. You can select it from "Configuration Registry" or "Governance Registry."

Read more in Registry.

8. Click on the "Add Child" button to add the first mediator to your sequence tree. All mediators are described in Mediators.

9. Click on the mediator to edit its properties. The properties can be configured under the sequence tree.

Tip

If you are familiar with the Synapse configuration language, you can edit the XML directly. In the "Sequence" window, click on "switch to source view" to view the XML of the sequence.

The following screenshot provides a source view of the sequence editor.

10. Add as many mediators as you need and define their properties. Also refer to: Adding a Mediator to a Sequence, Editing a Mediator, Adding a Child to Mediator, Deleting a Mediator.

You can add mediators as children at the root level or as children/siblings for an existing mediator. If a mediator is selected, then you may have access to the following options:

  • Add Child
  • Add Sibling

Tip

You can add siblings to all mediators, while you can add a child only to some mediators (called "nodes"). Refer to Adding a Child to Mediator.

If "Root" is selected, then you have access to the option:

  • Add Child

11. Place the added mediators in the necessary order. To move a mediator up or down, select it and then click on the arrow icon displayed in the node menu. Refer to Editing a Mediation Sequence.

12. All added mediators will be displayed in the "Sequence" tree.

13. Add a description of the Sequence clicking on the "Sequence Description" area.

14. Enter the description into the text area.

15. Click "Save" to add a new sequence to the "Mediation Sequences" list.

You also can save a sequence using the "Save as" button.

Then you need to specify the registry where you will save the sequence:

  • Governance Registry
  • Configuration Registry

Read more in Registry.

Note

If you use the "Save" button, a sequence will be saved to the Synapse configuration (default path is /repository/synapse/sequences). In this case, it will be a Defined sequence. If you use the "Save as" button, a sequence can be saved to any directory specified in the Configuration or the Governance Registry. In this case, it will be a Dynamic sequence.

16. A new sequence is added to the "Mediation Sequences" list.

Tip

The "Defined Sequences" tab shows sequences saved in Synapse configuration. The "Dynamic Sequences" tab shows sequences saved in Registry.