Use the endChoice() DSL method, see http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
On Fri, May 6, 2011 at 9:07 AM, edge <e.mcgr...@imilia.com> wrote: > Hi, > > I trying to use a choice and split but cannot as split breaks out of the > ChoiceDefinition and otherwise is not available. beanRef("bean1") produces > a > list that I'd like to process sequentially. Is there some way of > accomplishing this? If you uncomment //split().body() then the code won't > compile. > > from("x"). > choice(). > when(). > ognl("whatever"). > beanRef("bean1"). > //split().body(). > to("y"). > otherwise(). > beanRef("bean2"). > to("z"); > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Route-with-choice-and-split-tp4375184p4375184.html > Sent from the Camel - Users mailing list archive at Nabble.com. >