camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kalyanskanda <kalyanska...@hotmail.com>
Subject Use FlexibleAggregationStrategy in Spring DSL
Date Thu, 24 Oct 2013 07:24:06 GMT
Would like to enrich component which looks up customerId based on name and
enrich the inMessage for processing.
Please provide a sample on flexibleAggreation on Spring DSL.
Something like : 
 <camel:from uri="file:src/data?noop=true"/>
      <camel:choice>
        <camel:when>
          <camel:xpath>/person/city = 'London'</camel:xpath>
          <camel:log message="UK message"/>
             <camel:enrich beanRef="GetCityData" >
              
              
            </camel:enrich>
            <camel:aggregate>
                 <pick > <simple>"${header.ouput.pincode}</simple></pick>
                            <setHeader ${header.input.msg.pin}</setHeader>
          </camel:aggregate>
          <camel:to uri="file:target/messages/uk"/>
        </camel:when>
        <camel:otherwise>
          <camel:log message="Other message"/>
          <camel:to uri="file:target/messages/others"/>
        </camel:otherwise>
      </camel:choice>
    </camel:route>
  </camel:camelContext>
<bean id="appendXMLStragegy"
class="org.apache.camel.util.toolbox.FlexibleAggregationStrategy">
    



--
View this message in context: http://camel.465427.n5.nabble.com/Use-FlexibleAggregationStrategy-in-Spring-DSL-tp5742117.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message