camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kikou1984 <hichem.ouesl...@atos.net>
Subject Re: Splitter with option
Date Mon, 04 Feb 2013 15:35:19 GMT
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.

Mime
View raw message