Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A mediation sequence, commonly called a " sequence, " is a list tree of mediators that are executed in order. When  that you can use in your mediation workflow. When a message is delivered to a sequence, the sequence sends it through all its mediators.

...

When you want to work with mediation sequences, you can use the ESB tooling plug-in to create a new sequence as well as to import an existing sequence, or you can add, edit, and delete sequences via the Management Console.

For information on how to use the ESB tooling plug-in to create a new sequence or to import an existing sequence, see Working with Sequences via WSO2 ESB Tooling.

For information on working with local entries via the management console, see Working with Sequences via the Management Console.

Configuring a mediation sequence

You can define mediation sequences using the Management Console as described in Adding a Mediation Sequence. The underlying Synapse configuration uses the following syntax:

...

This sequence specifies three mediators in-line: the log mediator , property mediator , and the send mediator . It also references the named sequence "other_sequence" and therefore uses all the mediators defined in that sequence.

...

  • Create a dynamic sequence by referring to an entry in the registry, in which case the sequence will change as the registry entry changes.
  • Activate statistics collection by setting the statistics attribute to enable. In this mode the sequence will keep track of the number of messages processed and their processing times. For more information, see Monitoring the ESB /wiki/spaces/TESB/pages/32604738.
  • Activate trace collection by setting the trace attribute to enable. If tracing is enabled on a sequence, all messages being processed through the sequence will write tracing information through each mediation step. For more information, see Mediation Tracer.
  • Use the onError attribute to define a custom error handler sequence. If an error occurs while executing the sequence, this error handler will be called. If you do not specify an error handler, the fault sequence will be used, as described in the next section.

About the

...

main and

...

fault sequences
Anchor
mainSequence
mainSequence

A mediation configuration holds two special sequences named main and fault. All messages that are not destined for proxy services are sent through the main sequence. By default, the main sequence simply sends a message without mediation, so to add message mediation, you add mediators and/or named sequences in the main sequence.

...