Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18329

RouteTemplate: templateParameter doesn't get resolved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Bug
    • 3.18.0
    • 3.18.1, 3.19.0
    • camel-core
    • None
    • Unknown

    Description

      I have a routetemplate:

      routeTemplate("appendtobody")
        .templateParameter("append")
        .templateParameter("in")
        .templateParameter("out")
      .from("{{in}}")
      .transform(body().append("{{append}}"))
      .to("{{out}}");

       

      I create the route from template like this:

      <templatedRoutes xmlns="http://camel.apache.org/schema/spring">
         <templatedRoute routeId="100-2" routeTemplateRef="appendtobody">
            <parameter name="append" value="appendvalue"/>
            <parameter name="out" value="file://C/messages/in"/>
            <parameter name="in" value="file://C/messages/out"/>
         </templatedRoute>
      </templatedRoutes>

      I call it with a file that contains: "value" in the body.

      Expected output:

      valueappendvalue
      

      Actual output:

      value{{append}}
      

      Tested this scenario with 3.18.0 and 3.19.0-SNAPSHOT

       

       

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            skin27 Raymond
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: