[ 
https://issues.apache.org/jira/browse/CAMEL-18328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573419#comment-17573419
 ] 

Raymond commented on CAMEL-18328:
---------------------------------

Some additional information:

1) I load everything (routes / routetemplates / routeconfiguration) with the 
roadLoader.

2) I have camel-xml-io on my classpath

3) Test parameters creating the route from template

"in" parameter is 
file://C:/messages/in?autoCreate=false&directoryMustExist=true
"out" parameter is 
file://C:/messages/directorydoesnotexist?autoCreate=false&directoryMustExist=true


As a sidenote:

The routeConfiguration works when referencing the routeConfiguration from a 
normal route (not a route template). This however also only works as long as I 
don't have camel-xml-jaxb on my classpath (See 
https://issues.apache.org/jira/browse/CAMEL-17953).

Unfortunately because I need to remove the camel-xml-jaxb the route XML dumper 
doesn't work anymore. (See https://issues.apache.org/jira/browse/CAMEL-18305)





 

> RouteConfiguration with RouteTemplate doesn't work
> --------------------------------------------------
>
>                 Key: CAMEL-18328
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18328
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 3.18.0
>            Reporter: Raymond
>            Priority: Minor
>
> I have loaded a routeConfiguration:
> {code:java}
> <routeConfiguration id="myError">
>             <onException>
>                <exception>java.lang.Exception</exception>
>                <handled>
>                   <constant>true</constant>
>                </handled>
>                <redeliveryPolicy maximumRedeliveries="0" 
> redeliveryDelay="5000"/>
>                <setExchangePattern pattern="InOnly"/>
>                <to uri="log:myError?showAll=true&amp;multiline=true"/>
>             </onException>
>          </routeConfiguration>{code}
> I have a RouteTemplate:
> {code:java}
>          routeTemplate("myTemplate")
>                  .templateParameter("in")
>                  .templateParameter("out")
>                  .from("{{in}}")
>                      .routeConfigurationId("myError")
>                      .to("{{out}}");{code}
> But this routeConfigurationId doesn't seem to take effect. When calling the 
> routeConfigurationId directly from a route is works.
> Can you reproduce this?
> BTW: What I try to achieve:
> {code:java}
>          routeTemplate("myTemplate")
>                  
> .templateParameter("routeconfiguration_id","defaultErrorHandler")
>                  .templateParameter("in")
>                  .templateParameter("out")
>                  .from("{{in}}")
>                      .routeConfigurationId("{{routeconfiguration_id}}")
>                      .to("{{out}}");{code}
> Thus adding the routeConfigurationID through a templateParameter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to