This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Conditional Router Mediator
The Conditional Router Mediator (New in version 4.0) can be used to specify the routing of the message according to given conditions. This mediator checks whether the "Condition" evaluates to true and mediates using the target sequence. A matching route will break the router if the "Break after route" is set to true.
Syntax
<conditionalRouter continueAfter="(true|false)"> <route breakRoute="(true|false)"> <condition ../> <target ../> </route>+ </conditionalRouter>
UI Configuration
1. The 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. To add a route, click on the "Add Route" link.
2. Specify the following option of the Route:
- Continue after routing - (Yes/No), Specify whether to continue routing if any of the child routes are executed. The default value is No.
- Break after route - If set to true, a matching route will break the router.
- Evaluator Expression - Route condition.
- Target Sequence - A target sequence needs to be provided as registry key/local entry to do further mediation processing.