airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dimuthu...@apache.org
Subject [airavata] 01/01: Fixing AIRAVATA-3391 : Resolving parameters in the groovy map data
Date Fri, 27 Nov 2020 22:12:33 GMT
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 <dimuthu.upeksha2@gmail.com>
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);
         }


Mime
View raw message