The from statement is flagged as error in VSCode but is as far as I know valid
Java DSL:
package demonstrator;
import org.apache.camel.builder.RouteBuilder;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
@Configuration
@Component
public class BugDemonstratorRoutes extends RouteBuilder {
@Override
public void configure() throws Exception {
routeTemplate("wrapper").id("wrapper").templateParameter("name").templateParameter("suffix",
"Wrapper")
.templateParameter("component",
"direct").templateParameter("wrappedSuffix", "")
.from("{{component}}:{{name}}{{suffix}}").routeId("{{name}}{{suffix}}").log("Common
startup")
.to("direct:{{name}}{{wrappedSuffix}}").log("Common cleanup");
templatedRoute("wrapper").parameter("name", "foo");
from("direct:foo").routeId("foo").log("Foo executed");
from("timer:bar?repeatCount=1").routeId("bar").log("Bar
executed").to("direct:fooWrapper");
}
}
Knut-Håvard Aksnes
Lead Software Architect
www.quorumsoftware.com
https://www.linkedin.com/company/quorum-software/
Confidentiality Notice:
The information transmitted herein may contain confidential, proprietary
and/or privileged material which belongs to Quorum Software and is only for the
intended addressee(s). Any unauthorized review, distribution or other use of
this information is prohibited. Finally, the recipient should check this email
and any attachments for the presence of viruses. The organization accepts no
liability for any damage caused by any virus transmitted by this email. If you
received this email in error, please contact us at +1 (713) 430 8600 or by
return email and delete this email and any copies immediately. v&7.11.1989&$