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

Allow to create a Route from a route template in XML and YAML

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.16.0
    • came-core
    • None
    • Unknown

    Description

      With the existing code it is possible to create a route from a route template thanks to TemplatedRouteBuilder with a pure Java code or simply with a Kamelet. However in some particular cases it could be interesting to be able to create routes from a route template from a pure XML or YAML file especially for camel users that don't want to use Kamelets and write Java code.

       

      So for example, following XML snippet would allow to instantiate a route whose id is "my-route" from the route template "myTemplate" with the 2 parameters "for" and "bar" and the bean "myBean".   

      <templatedRoute routeTemplateRef="myTemplate" routeId="my-route">
          <parameter name="foo" value="fooVal"/>
          <parameter name="bar" value="barVal"/> 
          <bean name="myBean" type="#class:org.apache.camel.spring.routebuilder.MySpecialBean">
              <property key="name" value="John"/>
          </bean>
      </templatedRoute>

       

      Attachments

        Activity

          People

            essobedo Nicolas Filotto
            essobedo Nicolas Filotto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: