Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

11.3. Defining Inline Rules for Content-Based Routing with XPath

Procedure 11.1. Task

  1. Open jboss-esb.xml and set the cbrAlias property to XPath.
  2. Define the routing rules in the route-to configurations (found in the container destinations property) as shown:
    <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
    	<property name="cbrAlias" value="XPath"/>
    	<property name="destinations">
    		<route-to service-category="BlueTeam"  service-name="GoBlue"  expression="/Order[@statusCode='0']" />
    		<route-to service-category="RedTeam"   service-name="GoRed"   expression="/Order[@statusCode='1']" />
    		<route-to service-category="GreenTeam" service-name="GoGreen" expression="/Order[@statusCode='2']" />