Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Conditional Router Mediator specifies how a message should be routed based on given conditions. The specified target sequence is applied if the condition of the mediator evaluates to true

The Conditional Router mediator is a content-aware mediator.



Syntax

<conditionalRouter continueAfter="(true|false)">
    <route breakRoute="(true|false)">
      <condition ../>
      <target ../>
    </route>+
</conditionalRouter>

UI Configuration

The parameters available to configure the Conditional Router mediator are as follows.

Parameter NameDescription
Continue after Routing

This parameter specifies whether routing should be continued if any of the child routes are executed. Possible values are as follows.

  • Yes: If this is selected, routing is continued after child routes are executed.
  • No: If this is selected, routing is continued after the child routes are executed. This is the default value.
Add RouteClick this link to add a route. The conditional route will be added as a child to the Conditional Router mediator in the mediator tree as shown below.

You can add multiple conditional routes to a Conditional Router mediator by clicking on this link.

Click on the conditional route in the mediator tree to configure it. The parameters available to configure a conditional route are as follows.

Parameter NameDescription
Break after route

Possible values for this parameter are as follows.

  • True: If this is selected, a matching route would break the router.
  • False: If this is selected, a matching route would not break the router.
Evaluator ExpressionThe expression to evaluate the condition based on which the target mediation sequence should be applied.
Target SequenceThe mediation sequence to be applied if the expression entered in the Evaluator Expression parameter evaluates to true.

Example

See Sample 157: Conditional Router for Routing Messages based on HTTP URL, HTTP Headers and Query Parameters for an example of the Conditional Router mediator.

  • No labels