title: camel Java DSL Choice in a Choice
body: <p>I want to have </p>
  
  <pre><code>_ from( A )
  _ .split()...
  _ .choice() //Choice 1 
  _   .when( predicate )
  _     .process()
  
  _     .choice() // Choice 2 
  _       .when( x )
  _         .to( X )
  _       .otherwise()
  _         .to( Y )
  _     .end() // to terminate inner choice
  
  _   .endchoice() // tell camel we're back in the outer-choice - gets exception
  _   .otherwise() // Choice 1
  _     .to( Z )
  _ .end()
  </code></pre>
  
  <p>but I get runtime exception on the endChoice()</p>
  
  <pre><code>java.lang.ClassCastException: org.apache.camel.model.SplitDefinition cannot be cast to org.apache.camel.model.ChoiceDefinition
  </code></pre>
  
  <p>I get compile time error without it</p>
  
  <p>I suspect end() is ending the inner and outer choice, I only want it to end the inner one.</p>
  
  <p>not putting in the end() makes it treat the second otherwise() as an extension of the inner-choice. Which it isn't.</p>
  
  <p>I have found workaround by putting the second choice in a sub-route and "direct:SUB_ROUTE"-ing into it, but I would prefer to use the plainer structure I've outlined above if I could. Is there a way to achieve Choices in Choices or is this just a limitation of the Java DSL?</p>