![]() |
select rules-identifier rules-definition
do
[case "value" route-name | embedded-route]*
end
where:
rules-identifier - provides the semantic information required for rules processing
rules-definition - the rules, syntax depends on the rules-identifier.
rules-identifier = xpath | regex | drools | database
rules-definition = external identifier | inline rules definition
Applying the rules to the input would result in a string value, this could either be
the name of an existing route or a value, which can be mapped onto a route with a case statement.
There could be one or more case statements, the first matching route is executed.
If a route name is the result of the rules execution, then the case statements are not required.
route do
from "inbound"
filter xpath "name"
aggregate set (x=y)
select drools "myRouteRule" <-- returns route name based on input
end
route do
from "inbound"
filter xpath "name"
aggregate set (x=y)
select xpath "myXpath"
do
case "abc" route to "route1"
case "xyz" route to "route2"
end
end