camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a746076drdrb <a746...@drdrb.net>
Subject wiretap in otherwise does not work
Date Thu, 08 May 2014 08:49:52 GMT
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.

Mime
View raw message