Hi,
You are correct. The proper syntax should be
from("seda:a").choice().when(header("foo").isEqualTo("bar")).to("seda:b")
Cheers,
Ashwin...
Joe Fernandez wrote:
>
> Re the subject web page and this block of sample code found at the top of
> the page.
>
> from("jms:queue:order")
> .choice()
> .when().header("type").isEqualTo("widget").to("bean:widgetOrder")
> .when().header("type").isEqualTo("wombat").to("bean:wombatOrder")
> .otherwise()
> .to("bean:miscOrder")
> .end();
>
> Is the proper syntax being used for the 'when' predicates? Shouldn't it be
> like this?
>
> .when(header("type").isEqualTo("widget")).to("bean:widgetOrder")
> .when(header("type").isEqualTo("wombat")).to("bean:wombatOrder")
>
> Thanks,
> Joe
>
-----
---
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
---
+1-972-304-9084 (Office)
+1-972-971-1700 (Mobile)
----
Blog: http://opensourceknowledge.blogspot.com/
--
View this message in context:
http://www.nabble.com/camel.apache.org-predicate.html-tp23078145p23078434.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.