You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/01/31 08:54:48 UTC

(camel-kamelets-examples) branch main updated: CAMEL-19749: variables - Should also copy message headers into variable when using EIP variables

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new eda7800  CAMEL-19749: variables - Should also copy message headers into variable when using EIP variables
eda7800 is described below

commit eda7800707fa23a1109008862b184479d9254a6c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jan 31 09:54:38 2024 +0100

    CAMEL-19749: variables - Should also copy message headers into variable when using EIP variables
---
 jbang/variables-eip/myapp.yaml | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/jbang/variables-eip/myapp.yaml b/jbang/variables-eip/myapp.yaml
index e05fe9f..36e466a 100644
--- a/jbang/variables-eip/myapp.yaml
+++ b/jbang/variables-eip/myapp.yaml
@@ -26,18 +26,16 @@
               expression: .alcohol | rtrimstr("%")
               variableName: beer2
               resultType: float
-#      - choice:
-#          when:
-#            - id: choice
-#              expression:
-#                simple:
-#                  expression: ${variable.alc1} > ${variable.alc2}
-#              steps:
-#                - log:
-#                    message: ${variable.beer1.name} (${variable.beer1.alcohol}) is stronger
-#          otherwise:
-#            steps:
-#              - log:
-#                  message: ${variable.beer2.name} (${variable.beer2.alcohol}) is stronger
-      - log: "Beer1: ${variable.beer1} with alc ${variable.alc1}"
-      - log: "Beer2: ${variable.beer2} with alc ${variable.alc2}"
+      - choice:
+          when:
+            - id: choice
+              expression:
+                simple:
+                  expression: ${variable.alc1} > ${variable.alc2}
+              steps:
+                - log:
+                    message: Beer1 ${pretty(${variable.beer1})} is stronger
+          otherwise:
+            steps:
+              - log:
+                  message: Beer2 ${pretty(${variable.beer2})} is stronger