[
https://issues.apache.org/jira/browse/CAMEL-22920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-22920.
---------------------------------
Resolution: Not A Bug
yeah that double nesting is not supported
> Kamelet property is not resolved in a split EIP
> -----------------------------------------------
>
> Key: CAMEL-22920
> URL: https://issues.apache.org/jira/browse/CAMEL-22920
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-kamelet
> Affects Versions: 4.17.0
> Reporter: Raymond
> Priority: Minor
>
> In a Kamelet, I have the following route:
> {code:java}
> from:
> uri: "direct:start"
> steps:
> - split:
> language:
> language: "simple"
> expression: "${body.split(',')}"
> steps:
> - to: "log:test?showBody=true" {code}
> Sending the following message:
> {code:java}
> a,b,c {code}
> Gives the expected output:
>
> {code:java}
> 2026-01-28T14:56:18.155+01:00 INFO 14240 --- [gateway] [tp801843081-712]
> test : Exchange[ExchangePattern: InOut,
> BodyType: String, Body: a]
> 2026-01-28T14:56:18.161+01:00 INFO 14240 --- [gateway] [tp801843081-712]
> test : Exchange[ExchangePattern: InOut,
> BodyType: String, Body: b]
> 2026-01-28T14:56:18.165+01:00 INFO 14240 --- [gateway] [tp801843081-712]
> test : Exchange[ExchangePattern: InOut,
> BodyType: String, Body: c] {code}
> However, when I replace the expression with a Kamelet property \{{expression}}
> {code:java}
> from:
> uri: "direct:start"
> steps:
> - split:
> language:
> language: "simple"
> expression: "{{myExpression}}"
> steps:
> - to: "log:test?showBody=true" {code}
> And the myExpression parameter value is: ${body.split(',')}
> Sending the same message, I get the following output:
> {code:java}
> 2026-01-28T14:46:26.461+01:00 INFO 46744 --- [gateway] [p1699750684-659]
> test : Exchange[ExchangePattern: InOut,
> BodyType: String, Body: ${body.split(',')}]{code}
> In this case, it seems that the expression is treated like a constant, and
> the expression is set as the body.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)