title: Apache Camel Issue having routingSlip after a filter
body: <p>I am in the process of implementing a Camel route in which I need to put a filter before redirecting the message processing to an end point or another depending of a <code>routing slip</code> header. Something like below:</p>
  <pre><code>        from(&quot;direct:a&quot;)
              .routeId(&quot;a&quot;)
              .choice()
                  .when(header(&quot;foo&quot;))
                      .filter(body().isNotNull())
                      .routingSlip(header(&quot;my-slip&quot;))
                  .endChoice()
                  .otherwise()
                      .log(&quot;header 'foo' was false&quot;)
                  .endChoice()
              .end();
  </code></pre>
  <p>When trying to run the application I am getting the following exception:</p>
  <pre><code>java.lang.ClassCastException: class org.apache.camel.model.FilterDefinition cannot be cast to class org.apache.camel.model.ChoiceDefinition
  </code></pre>
  <p>Any explanation why this is not a legal construct and how should I code my route to achieve what I want. From my own observations it is the <code>choice()</code> construct that is causing this. Adding a <code>routingSlip</code> construct after a <code>filter</code> works just fine if the choice is not there.</p>
  <p>Thank you in advance for your inputs.</p>