[ https://issues.apache.org/jira/browse/CAMEL-18614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17618885#comment-17618885 ]
Raymond commented on CAMEL-18614: --------------------------------- I attached the complete Class (RouteBuilder) that loads the routes, routeConfiguration and templatedRoutes. BTW: My initial idea to have an XML, something like <camel id="1234"> <routes> </routes> <routeConfigurations> </routeConfiguration> <templatedRoutes> </templateRoutes> <dataFormats> </dataFormats> <!-- etc --> </camel> And then {code:java} loader.loadOrUpdate(String xml);{code} Maybe the above will be available when this issues is solved: https://issues.apache.org/jira/browse/CAMEL-18189 ------------ Until now, because the above use case isn't possible, I load them one by one with the routeLoader. I want to use "context.getRoute("id")" to check if I need to use the load or update method. However this doesn't seems to cover all use cases. For example routeconfigurations doesn't work. This also seems to be the case when the route failes to load. On loading it again, the id is already loaded. > Getting Route for a RouteConfiguration is null when doing manual route loading > ------------------------------------------------------------------------------ > > Key: CAMEL-18614 > URL: https://issues.apache.org/jira/browse/CAMEL-18614 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 3.18.2 > Environment: Version: Camel 3.18.2 > JDK: 11 (Temurin) > Reporter: Raymond > Priority: Minor > Attachments: FlowLoader.java > > > I load the routeConfiguration like this: > > {code:java} > loader = extendedCamelContext.getRoutesLoader(); > loader.loadRoutes(resource);{code} > {color:#cc7832} > {color:#172b4d}On a later moment, I like to remove or update the > routeConfiguration, but I first want to check if it's already loaded. To do > this, I try to get the route: > {color} > {color} > > {code:java} > List<Route> routes = context.getRoutes(); > > //or > Route route = context.getRoute(id); > {code} > > {color:#172b4d}The route for the routeConfiguration is null and it's also not > in the list. However when I would load it again it says "RouteConfiguration > ID already exists".{color} > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)