Advanced routing
The Enterprise Integrator has two other mediators that are more powerful and complex:
- Conditional router mediator
- Rule mediator
These mediators allow us to create different rules for the messages and redirect the flow of the service to an existing sequence containing the logical to apply in every particular condition.
The conditional router mediator
With this mediator, we can define different rules and throw a specific sequence to process this request.
Let's look at the syntax:
<conditionalRouter continueAfter="(true|false)"> <conditionalRoute breakRoute="(true|false)"> <condition ../> <target ../> </conditionalRoute>+ </conditionalRouter>
Here, keep the following points in mind:
continueAfter
specifies whether the routing must continue when a child route is executedbreakRoute
configures whether a matching route will break the router- Target contains the name of the sequence to execute
Inside the condition
tag, we can use the...