Hello,
I do not know why, but if you split your route separating when and split, it
compiles (also, notiche that the split expression goes inside split method)
:
from("x").
choice().
when().ognl("whatever").
to("direct:handlewhatever").
otherwise().
to("direct:handleotherwise");
from("direct:handlewhatever").
beanRef("bean1").
split(body()).
to("y");
from("direct:handleotherwise").
beanRef("bean2").
to("z");
Regards.
Javier Arias.
2011/5/6 edge <[email protected]>
> 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.
>