[
https://issues.apache.org/jira/browse/CAMEL-22882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18053362#comment-18053362
]
Claus Ibsen edited comment on CAMEL-22882 at 1/22/26 2:13 PM:
--------------------------------------------------------------
TODO: static token parse *DONE*
TODO: csimple code generator *WONT FIX*
TODO: more docs *DONE*
was (Author: davsclaus):
TODO: static token parse *DONE*
TODO: csimple code generator
TODO: more docs *DONE*
> camel-core - Local assignment for temporary variables in simple expressions
> ---------------------------------------------------------------------------
>
> Key: CAMEL-22882
> URL: https://issues.apache.org/jira/browse/CAMEL-22882
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.18.0
>
>
> If you use simple for mapping or something a little bit more complex, then
> you may want to be able to assign local temporary variables with calculations
> or other expressions to make it easier to build up the result.
> {code:java}
> ${localVariables(
> $foo = ${sum(1,2,3)}
> $len = ${body.length}
> $zip = ${body.zip.code}
> $priority = $foo > 999 ? true : false
> )}
> id: ${body.id}
> postal: ${variable.zip}
> quick: ${priority} ? 'high' : 'normal'{code}
> So if we can make $\{localVariable(..) some kind of pre calculations that has
> no affect on the result of the expression and that it does not add up as
> empty lines etc.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)