finally figured it out.

first, because a ChoiceDefinition will compile just fine, but throw an
exception at runtime, set the "from" to a local RouteDefinition variable -
this way, the editor/compiler will complain.



(note: the cast is needed because when you use ".end()" or ".filter()" it
returns a ProcessorDefinition or "Capture" - both of which *can* be cast to
a RouteDefinition)

a couple of rules I found about ".choice":

1) only use ".endChoice()" after a ".multicast()" (or other complex pattern)
that is within a ".when()" or at the end of an ".otherwise()".

2) use ".end()" at the final end of the ".choice()"

here is my final complicated example from the original question that works:



 Thank you Claus for ultimately pointing me in the right direction!!!




--
View this message in context: 
http://camel.465427.n5.nabble.com/RouteBuilder-from-exposing-as-a-ChoiceDefinition-rather-than-a-RouteDefinition-tp5743309p5743447.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to