[ 
https://issues.apache.org/jira/browse/CAMEL-22095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-22095.
---------------------------------
    Resolution: Fixed

> camel-core - Rest DSL with inlined routes does not work with AdviceWith 
> testing
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-22095
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22095
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-test
>    Affects Versions: 4.8.7, 4.10.4
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.8.8, 4.10.5, 4.12.0
>
>
> Dear Camel Team,
>  
> I ran into an issue when updating a client's Camel routes to a version past 
> 4.5 (which does inline routes into REST routes by default):
>  
> AdviceWithTasks.doReplace() / getOutputs() works on a List of Outputs. To get 
> this list, it looks up a node's parent field. If the Route was inlined, this 
> parent field points to the original route object instead of the active one, 
> because DefaultModel.addRouteDefinitions() does not update the parent fields 
> in the inlining process.
> As a result, AdviceWith manipulates a route that is not active anymore and 
> has no effect on the route that is actually running.
>  
> As a workaround, inlining can be disabled, but I still feel this is a bug, or 
> rather two: * 
> Inlining should properly update fiels of copied nodes
>  * 
> AdviceWithTasks.getOutputs(ProcessorDefinition<?> node, RouteDefinition 
> route) should probably get the outputs from the route rather than the 
> indirect lookup via the parent in most cases



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

Reply via email to