First I don't see how that would work, as the method is spelled "onCompletion". You can try using onWhen with onCompletion ([1] last section on the page):
.onCompletion().onWhen(...)

Cheers,
Hadrian

[1] http://camel.apache.org/oncompletion.html


On 11/24/2011 08:19 AM, marcin wrote:
Hi,

Can I have multiple onCompletition block in single camel's route?

My route is following:

from("direct:test")
   .onCompletition().onCompleteOnly()
     .to("direct"success")
   .end()
   .onCompletition().onFailureOnly()
     .to("direct:failure")
   .end()
   .process(new MyProcessor())
.end();

But, in this case any onCompletition block is executing regardless of
processor throws exception. I use Camel 2.6.0.

Cheers,
Marcin


--
View this message in context: 
http://camel.465427.n5.nabble.com/onCompletition-block-tp5020141p5020141.html
Sent from the Camel - Users mailing list archive at Nabble.com.

--
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/

Reply via email to