Java RouteBuilder with blocks seems to not work correctly with end()
--------------------------------------------------------------------

                 Key: CAMEL-1606
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1606
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0-M1, 1.6.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.0.0


Working on the new DSL for onComplete, onFailure callbacks for Exchange when 
its done.

The route below is to define a subroute (the block with sycnhronize).

{code}
                from("direct:start")
                    .synchronize()
                        .to("mock:before")
                        .process(complete)
                        .to("mock:after")
                    .end()
                    .transform(constant("Bye World"))
                    .to("mock:result");
{code}

So the otuer route should be:
from -> sync -> transform -> mock:result

and sync sub route should be:
sync -> mock:before -> process -> mock:after

But with the current codebase the end() is not handling the block correctly.
It ends with the outer route being incl. the sub route:
from -> sync -> mock:before -> process -> mock:after -> transform -> mock:result

Spring DSL does not have this issue as it uses XML tags to indicate sub routes 
and where they start/end

-- 
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