From 60f538a9cd59927f32715d4f3138b9eb8c9602c2 Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti Date: Fri, 4 Oct 2024 15:40:26 +0200 Subject: [PATCH] [Fix #3694] Modifying for each example --- .../src/main/resources/foreach.sw.json | 2 +- .../kie/kogito/serverless/workflow/examples/ForEachJava.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json index dbd6852ad6..b0a5e4212d 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json @@ -13,7 +13,7 @@ { "name": "increase", "type": "expression", - "operation": ".item + 1" + "operation": "$item + 1" } ], diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ForEachJava.java b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ForEachJava.java index 52c74e5cfc..c1373d3525 100644 --- a/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ForEachJava.java +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ForEachJava.java @@ -57,7 +57,7 @@ static Workflow getWorkflow() { // then for each element in input names concatenate it with that message .next(forEach(".names").loopVar("name").outputCollection(".messages") // jq expression that suffix each name with the message retrieved from the file - .action(call(expr("concat", ".name+.adviceMessage"))) + .action(call(expr("concat", "$name+.adviceMessage"))) // only return messages list as result of the flow .outputFilter("{messages}")) .end().build();