you mean
from("x").
choice().
when().
ognl("whatever").
beanRef("bean1").
split().body().to("y").
to("y").endChoice(). // <---endChoice() error not defined
otherwise().
beanRef("bean2").
to("z");
doesn't compile endChoice is not available.
However, I did find a solution using the direct component to break up the
route as follows
from("direct:myRoute").split().body().to("y");
from("x").
choice().
when().
ognl("whatever").
beanRef("bean1").
to("direct:myRoute").
otherwise().
beanRef("bean2").
to("z");
I tested it and it seems to work fine!
--
View this message in context:
http://camel.465427.n5.nabble.com/Route-with-choice-and-split-tp4375184p4375301.html
Sent from the Camel - Users mailing list archive at Nabble.com.