I tried this one :

.split() 
.method(myClass, "methodTosplit") 
.choice().when().simple("${property.CamelSplitIndex} == 2")
  .bean(myClassA, "methodA") 
 .otherwise()
   .bean(myClassB, "methodB"); 


it works.

if you got a better idea let me know thxs.
For each split, the body change by creating a new one, but not the header.

how can i do to reload the header for each split ? 

Then i can put : for the fist split headers.put("Array",fistOne") and for
the second  headers.put("Array",secondOne").

And in the main prog, i can make test, 

        .choice().when().simple("${in.header.Array} == fistOne").bean(myClassA,
"methodA") 
        .otherwise()
        .bean(myClassB, "methodB"); 


thxs.


 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Splitter-with-option-tp5726900p5726909.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to