From commits-return-23331-archive-asf-public=cust-asf.ponee.io@airavata.apache.org Fri Nov 27 22:12:34 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id EEC8F180686 for ; Fri, 27 Nov 2020 23:12:33 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 2714A446FA for ; Fri, 27 Nov 2020 22:12:33 +0000 (UTC) Received: (qmail 26559 invoked by uid 500); 27 Nov 2020 22:12:32 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 26549 invoked by uid 99); 27 Nov 2020 22:12:32 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Nov 2020 22:12:32 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 4779F81FC4; Fri, 27 Nov 2020 22:12:32 +0000 (UTC) Date: Fri, 27 Nov 2020 22:12:33 +0000 To: "commits@airavata.apache.org" Subject: [airavata] 01/01: Fixing AIRAVATA-3391 : Resolving parameters in the groovy map data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: dimuthuupe@apache.org In-Reply-To: <160651515201.26604.2898150680123994071@gitbox.apache.org> References: <160651515201.26604.2898150680123994071@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: airavata X-Git-Refname: refs/heads/AIRAVATA-3391 X-Git-Reftype: branch X-Git-Rev: 79efb906036de33e168c97aa9740171c131df336 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20201127221232.4779F81FC4@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. dimuthuupe pushed a commit to branch AIRAVATA-3391 in repository https://gitbox.apache.org/repos/asf/airavata.git commit 79efb906036de33e168c97aa9740171c131df336 Author: Dimuthu Wannipurage AuthorDate: Fri Nov 27 17:12:18 2020 -0500 Fixing AIRAVATA-3391 : Resolving parameters in the groovy map data --- .../airavata/helix/impl/task/submission/config/GroovyMapData.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapData.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapData.java index 316a34f..cc1d5e1 100644 --- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapData.java +++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapData.java @@ -531,6 +531,8 @@ public class GroovyMapData { Writable make; try { make = engine.createTemplate(templateStr).make(toImmutableMap()); + String intermediateOut = make.toString(); + make = engine.createTemplate(intermediateOut).make(toImmutableMap()); // Parsing through the map to resolve parameters in the map values (AIRAVATA-3391) } catch (Exception e) { throw new Exception("Error while generating script using groovy map for string " + templateStr, e); } @@ -552,8 +554,9 @@ public class GroovyMapData { TemplateEngine engine = new GStringTemplateEngine(); Writable make; try { - make = engine.createTemplate(templateUrl).make(toImmutableMap()); + String intermediateOut = make.toString(); + make = engine.createTemplate(intermediateOut).make(toImmutableMap()); // Parsing through the map to resolve parameters in the map values (AIRAVATA-3391) } catch (Exception e) { throw new Exception("Error while generating script using groovy map for template " + templateUrl.getPath(), e); }