Index Changes
This is version 1. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Enterprise Integration Patterns - Content Based Router

Overview

In many business scenarios it is imperative that documents are processed based on their content. Several processing systems are integrated together to provide a unified solution. Messages need to be routed to the right component based on the requirement, which could be discerned only after examining the message content. The Content Based Router addresses this space.


Use Cases

Syntax

    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.
      
      

Examples


 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 

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 08-Jan-09 15:48 PM, -0800 by Nikita