Nicolas Filotto created CAMEL-17611:
---------------------------------------
Summary: Allow to create a Route from a route template in XML and
YAML
Key: CAMEL-17611
URL: https://issues.apache.org/jira/browse/CAMEL-17611
Project: Camel
Issue Type: Improvement
Components: came-core
Reporter: Nicolas Filotto
Assignee: Nicolas Filotto
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".
{code:java}
<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>{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)