<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>WSO2 EI - Conditional Router Mediator </title>
  <link href="css/EI-docs.css" rel="stylesheet" />
  <link href="styles/dist-docs.css" rel="stylesheet" type="text/css"
  media="all" />
</head>

<body>
<h2>Conditional Router Mediator</h2>

<p>Conditional Router mediator is used to route messages based on 'Condition' provided by user. </p>

<p>
The Conditional  Router mediator can be used to specify the routing of the message according to given conditions. Mediator checks whether the<br/>
 'Condition' evaluates to true and mediates using the target sequence.
 Matching route will break the router if the 'Break after route' is set to true.
</p>

<h3>Syntax</h3>

<pre xml:space="preserve">
 &lt;conditionalRouter continueAfter="(true|false)"&gt;
    &lt;route breakRoute="(true|false)"&gt;
      &lt;condition ../&gt;
      &lt;target ../&gt;
    &lt;/route&gt;+
   &lt;/conditionalRouter&gt;
</pre>

<h3>UI Configuration</h3>

<p><img alt="conditional router Mediator" src="../conditionalrouter-mediator/docs/images/conditionalrouter_mediator_screenshot.png" /> </p>

<p><strong>Figure1: Conditional Router Mediator</strong> </p>

<h4>Configurations</h4>

<p>User can define any number of routes. Each and every route must contain a 'condition' which is to be evaluated and a predefined 
 'Target' sequence, which will be used to mediate further. 
</p>

<p><img  alt="conditional router Mediator" src="../conditionalrouter-mediator/docs/images/conditionalroute_mediator_screenshot.png" /></p>
<p><strong>Figure 2: Route Configuration</strong></p>

<ul>
<li>
Continue after routing: (Yes/No), Whether to continue the routing if any of the child routes are executed. The default value is No.
</li>
<li>
Break after route : If set to true, matching route will break the router.
</li>
<li>
Evaluator Expression : Route condition .
</li>
<li>
Target Sequence : Target sequence need to be provided as registry key/local entry to do further mediate processing.
</li>
</ul>
 
</body>
</html>
