[ 
https://issues.apache.org/activemq/browse/CAMEL-676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44033#action_44033
 ] 

Claus Ibsen commented on CAMEL-676:
-----------------------------------

*Without proceed:*
*dsl:* intercept(header("user").isEqualTo("test")).to("mock:test");
*answer:* Intercept[[Choice[ [When[ Expression[null] -> [EMAIL PROTECTED] 
Otherwise[[To[mock:test]]]]]]

*With explicit proceed:*
*dsl:* intercept(header("user").isEqualTo("test")).to("mock:test").proceed();
*answer:* Intercept[[Choice[ [When[ Expression[null] -> [EMAIL PROTECTED] 
Otherwise[[To[mock:test], [EMAIL PROTECTED]

> intercept with predicate doesnt proceed as default
> --------------------------------------------------
>
>                 Key: CAMEL-676
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-676
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>             Fix For: 1.4.0
>
>
> If the intercept has a predicate it seems as if it doesn't proceed by default 
> or the like.
> {code}
>     public void testInterceptor() throws Exception {
>         MockEndpoint mockTest = getMockEndpoint("mock:test");
>         mockTest.expectedBodiesReceived("Camel in Action");
>         MockEndpoint mockOk = getMockEndpoint("mock:ok");
>         mockOk.expectedBodiesReceived("Camel in Action");
>         template.sendBodyAndHeader("seda:order", "Camel in Action", "user", 
> "test");
>         mockTest.assertIsSatisfied();
>         mockOk.assertIsSatisfied();
>     }
>     protected RouteBuilder createRouteBuilder() throws Exception {
>         return new RouteBuilder() {
>             public void configure() throws Exception {
>                 // TODO: enable this with predicate instead of the one below 
> fails the unit test
>                 //intercept(header("user").isEqualTo("test")).to("mock:test");
>                 // this without predicate success
>                 intercept().to("mock:test");
>                 from("seda:order").to("mock:ok");
>             }
>         };
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to