Hello,

I'm getting Exception: 

in thread "main" org.apache.camel.RuntimeCamelException:
java.lang.ClassCastException: org.apache.camel.model.OtherwiseDefinition
cannot be cast to org.apache.camel.model.ChoiceDefinition

when using wireTap in otherwise(). I've tried to use end() and endChoice()
but it doesn't help. Is it possible to use wiretap definition in otherwise
clause?



    from("timer://foo?fixedRate=true&period=3s")
        .choice()
            .when(property("falseproperty").isEqualTo(true))
                .to("direct:falseproperty")
            .otherwise()
                .wireTap("direct:wiretapp")
                    .newExchangeBody(constant("in wiretap"))
                    .end()
                .setBody(constant("after wiretapping"))
                .to("log:end")
        .endChoice();





--
View this message in context: 
http://camel.465427.n5.nabble.com/wiretap-in-otherwise-does-not-work-tp5750955.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to