You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2020/11/27 22:12:32 UTC

[airavata] branch AIRAVATA-3391 created (now 79efb90)

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

dimuthuupe pushed a change to branch AIRAVATA-3391
in repository https://gitbox.apache.org/repos/asf/airavata.git.


      at 79efb90  Fixing AIRAVATA-3391 : Resolving parameters in the groovy map data

This branch includes the following new commits:

     new 79efb90  Fixing AIRAVATA-3391 : Resolving parameters in the groovy map data

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[airavata] 01/01: Fixing AIRAVATA-3391 : Resolving parameters in the groovy map data

Posted by di...@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 <di...@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);
         }