This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new ac581fb Update route-template.adoc ac581fb is described below commit ac581fbb559039b4acc86a011a7d7bc960bbf6fe Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Aug 31 16:57:04 2020 +0200 Update route-template.adoc --- docs/user-manual/modules/ROOT/pages/route-template.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/route-template.adoc b/docs/user-manual/modules/ROOT/pages/route-template.adoc index f373f8d..702f3fe 100644 --- a/docs/user-manual/modules/ROOT/pages/route-template.adoc +++ b/docs/user-manual/modules/ROOT/pages/route-template.adoc @@ -94,19 +94,19 @@ There is a fluent builder variation as shown below: [source,java] ---- // create two routes from the template - context.addRouteFromTemplate("myTemplate") + TemplatedRouteBuilder.builder(context, "myTemplate") .parameter("name", "one") .parameter("greeting", "Hello") - .build(); + .add(); - context.addRouteFromTemplate("myTemplate") + TemplatedRouteBuilder.builder(context, "myTemplate") .parameter("name", "two") .parameter("greeting", "Bonjour") .parameter("myPeriod", "5s") - .build(); + .add(); ---- -The returned value from `addRouteFromTemplate` is the route id of the new route that was added. +The returned value from `add` is the route id of the new route that was added. However `null` is returned if the route is not yet created and added, which can happen if `CamelContext` is not started yet. @@ -127,11 +127,11 @@ Or with the fluent builder: [source,java] ---- - context.addRouteFromTemplate("myTemplate") + TemplatedRouteBuilder.builder(context, "myTemplate") .routeId("myCoolRoute") .parameter("name", "one") .parameter("greeting", "Hello") - .build(); + .add(); ---- == JMX management