Mediation Sequences - User Guide

Mediation Sequences

Use the Mediation Sequences page to add new sequences or edit existing sequences. As shown in Figure,1 the sequence management section displays a list of existing sequences.

Figure 1: Mediation sequence management

In the navigator, under Manage/Mediation, click Sequences. The Mediation Sequences page appears. The above options are turned off by default because they cause a severe performance degradation. Use these options only in a situation where you have to debug a particular problem.

Adding a Sequence

  1. On the Mediation Sequences page, click Add Sequence. The Design Sequence page appears.
  2. Enter a sequence name.
  3. Click Add Child, and select the required nodes for your sequence. Each option is described under Field descriptions

Figure 2: Add sequence design view

Editing a sequence

  1. On the Mediation Sequences page, click Edit. The Design Sequence page appears, displaying the selected sequence.
  2. Figure 3: Editing a sequence
  3. Click on the node you want edit. The properties for that node will be displayed below.
  4. Figure 4: Editing node specific properties

Click switch to source view to view the XML of the particular sequence. If you're familiar with the Synapse configuration language you can edit the XML directly.

Sequence source view

Figure 5: Source view of the sequence editor

Field Descriptions
Core
Drop
Drops a particular message
Sequence
Defines a reference to an already defined sequence
Send
Sends the message to an endpoint defined inside the endpoint property. If an endpoint is not defined, sends the message to the address specified in the "to" header.
Log
Logs the received messages
Property
Handles message and transport level properties
Event
Send event notifications to an event source
Extension
Script
Defines a script in a scripting language and diverts control to that particular script
Class
Defines a reference to the Java class which implements the Mediator interface. Control will be passed to this class.
Spring
Defines a reference to a Spring bean which will take control
Command
Holds a reference to a class with only an execute method without having to implement the Mediator interface
Filter
Switch
Filters a message like in a switch case statement according to specified conditions
Filter
Filters a message like in an If Else clause
Out
Filters the outgoing messages
Validate
Validates a particular message over schema
In
Filters the incoming messages
Router
Route messages based on XPath filtering
Advanced
RMSequence
Used with RM to create a message sequence
DBReport
Writes data to a database
Aggregate
Used for batch processing where a collection of messages gets treated as one
Clone
Makes copies of a message
Throttle
Throttle messages
Callout
Used to do a blocking call to a particular service
Iterate
Iterates over a set of message elements
DBLookup
Reads data from a database and gets it into a message
Cache
Caches response messages
Transaction
Executes a set of mediators transactionally
Rule
Rule based message mediation
Entitlement
Fine grained authentication
Transform
Fault
Creates a SOAP fault
Header
Processes message headers
XSLT
Transforms a particular message
XQuery
Transforms a message using XQuery

For more information please refer to the WSO2 library