camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhinavm <>
Subject endChoice() in Camel Scala DSL
Date Wed, 23 Oct 2013 15:46:08 GMT

I have a scenario, where some code needs to go into choice, some in
otherwise, and some common clean-up code needs to be executed after that in
both scenarios. Since I could not find endChoice() or end() in the Scala
DSL, I tried the following piece of code, but could not achieve what I
wanted. Basically it would consider all the code after otherwise as a part
of otherwise. Can someone please tell me where I am going wrong ? 

        when(exchange => exchange.getIn.getBody(classOf[String]) != null){
          process(new ResponseProcessor)
          .log(LoggingLevel.INFO,"File with content: ${body}")
          .log("Completed Job")
        } otherwise{
          log(LoggingLevel.INFO,"Empty Body")
      .log("Should Reach Here in all scenarios")


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message