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

Claus Ibsen updated CAMEL-21958:
--------------------------------
    Fix Version/s: 4.10.4
                   4.12.0

> camel-core - Java DSL wrong "otherwise" is triggered when having nested choice
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-21958
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21958
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 4.11.0
>            Reporter: Denis Misin
>            Priority: Major
>             Fix For: 4.10.4, 4.12.0
>
>
>     from("direct:_getEmployeeContacts")
>       .errorHandler(noErrorHandler())
>       .choice()
>         .when(exchangeProperty(EMPLOYEE_CONTACTS))
>           .transform(exchangeProperty(EMPLOYEE_CONTACTS))
>         .otherwise()
>           .to("direct:_processHeaders")
>           .setHeader(Exchange.HTTP_METHOD, constant("GET"))
>           .log("Getting employee contacts ")
>           
> .toD("https://${exchangeProperty."+INPUT_MESSAGE+"?.metadata?.url}/{{api.base}}/employees/${exchangeProperty."+EMPLOYEE_ID+"}/employeeContacts?throwExceptionOnFailure=false";)
>           .choice()
>             .when(simple("${header."+Exchange.HTTP_RESPONSE_CODE+"} == 200"))
>               .unmarshal(new 
> ListJacksonDataFormat(EmployeeContactAPIModel.class))
>               .endChoice()
>             .otherwise()
>               .to("direct:_httpError")
>           .end()
>       .end();
> This code stopped working after Camel upgrade from 4.0 to 4.11.
> The last otherwise is always hit.
> https://camel.zulipchat.com/#narrow/channel/257298-camel/topic/Nested.20choice/near/511800701



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

Reply via email to