title: Camel Predicate Example in xml DSL
body: <p>How can I implement following Predicate Example <a href="http://camel.apache.org/predicate.html" rel="noreferrer">given</a> in Spring DSL:</p>
  
  <pre><code>Predicate isWidget = header("type").isEqualTo("widget");
  
  from("jms:queue:order")
     .choice()
        .when(isWidget).to("bean:widgetOrder")
        .when(isWombat).to("bean:wombatOrder")
     .otherwise()
        .to("bean:miscOrder")
     .end();
  </code></pre>