On Wed, Aug 15, 2012 at 5:01 PM, Hilde <hilde.sch...@yahoo.de> wrote: > Hello folks! > > I have figured out that onCompletion().onWhen() cannot be used multiple. > > Actually onCompletion().onWhen() suggests to use it multiple erroneously. > I wrote the following route: > > from("seda:" + SedaDirectDestinations.SEDA_LOAD).routeId(ROUTE_ID) > .onCompletion().onWhen(simple("${header.status} != 0")) > .bean(loadPayloads, "finalFail") > .to("activemq:topic:" + JmsDestinations.TOPIC_DASHBOARD_AUDITLOG) > .end() > .onCompletion().onWhen(simple("${header.status} == 0")) > .bean(loadPayloads, "finalSuccess") > .to("activemq:topic:" + JmsDestinations.TOPIC_DASHBOARD_AUDITLOG) > .end() > ... > > But that doesn't work because the latter onCompletion().onWhen() overwrites > the first one. > onCompletion().onWhen() must not exist more than once. > > Maybe you can publish that hint on http://camel.apache.org/oncompletion.html >
Thanks I have updated that page with a note about this. > cheers > Hilde > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/onCompletion-with-onWhen-predicate-tp5717401.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen