airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject git commit: updated to use data models. AIRAVATA-1032
Date Thu, 27 Feb 2014 20:26:20 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 6ed27b9ce -> 732224707


updated to use data models. AIRAVATA-1032


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/73222470
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/73222470
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/73222470

Branch: refs/heads/master
Commit: 7322247078f5db2738f4f8203aee269522a5dfa0
Parents: 6ed27b9
Author: raminder <raminder@apache.org>
Authored: Thu Feb 27 15:26:07 2014 -0500
Committer: raminder <raminder@apache.org>
Committed: Thu Feb 27 15:26:07 2014 -0500

----------------------------------------------------------------------
 .../gfac/context/JobExecutionContext.java       |  34 +--
 .../org/apache/airavata/gfac/cpi/GFacImpl.java  |  12 +-
 .../gfac/handler/GridFTPOutputHandler.java      |  11 +-
 .../gfac/provider/impl/BESProvider.java         |  12 +-
 .../provider/utils/ApplicationProcessor.java    |   2 +-
 .../gfac/provider/utils/DataTransferrer.java    |   7 +-
 .../gfac/provider/utils/ResourceProcessor.java  |  11 +-
 .../apache/airavata/gfac/utils/GFacUtils.java   | 296 +++++++++----------
 .../airavata/gfac/utils/GramRSLGenerator.java   |   9 +-
 9 files changed, 186 insertions(+), 208 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
index b8e6f87..8f9e8d8 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
@@ -21,18 +21,17 @@
 
 package org.apache.airavata.gfac.context;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.airavata.gfac.GFacConfiguration;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.notification.GFacNotifier;
 import org.apache.airavata.gfac.provider.GFacProvider;
-import org.apache.airavata.model.experiment.ConfigurationData;
-import org.apache.airavata.schemas.wec.ContextHeaderDocument;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
 
 public class JobExecutionContext extends AbstractContext{
 
@@ -46,7 +45,7 @@ public class JobExecutionContext extends AbstractContext{
 
     private GFacNotifier notifier;
     
-    private ConfigurationData configurationData;
+    private TaskDetails taskData;
 
 //    private ContextHeaderDocument.ContextHeader contextHeader;
 
@@ -174,7 +173,15 @@ public class JobExecutionContext extends AbstractContext{
         return inPath;
     }
 
-    public boolean isOutPath(){
+    public TaskDetails getTaskData() {
+		return taskData;
+	}
+
+	public void setTaskData(TaskDetails taskData) {
+		this.taskData = taskData;
+	}
+
+	public boolean isOutPath(){
         return !inPath;
     }
 
@@ -194,14 +201,7 @@ public class JobExecutionContext extends AbstractContext{
 //        this.contextHeader = contextHeader;
 //    }
 
-	public ConfigurationData getConfigurationData() {
-		return configurationData;
-	}
-
-	public void setConfigurationData(ConfigurationData configurationData) {
-		this.configurationData = configurationData;
-	}
-
+	
 	public SecurityContext getSecurityContext(String name) throws GFacException{
 		SecurityContext secContext = securityContext.get(name);
 		return secContext;

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
index f9784f1..4dbca11 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
@@ -53,6 +53,8 @@ import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthentica
 import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.model.experiment.ConfigurationData;
+import org.apache.airavata.model.workspace.experiment.DataObjectType;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.cpi.DataType;
 import org.apache.airavata.registry.cpi.Registry;
@@ -112,13 +114,13 @@ public class GFacImpl implements GFac {
     public JobExecutionContext submitJob(String experimentID,String taskID) throws GFacException
{
         JobExecutionContext jobExecutionContext = null;
         try {
-            ConfigurationData configurationData = (ConfigurationData) registry.get(DataType.TASK_DETAIL,
taskID);
+        	TaskDetails taskData = (TaskDetails) registry.get(DataType.TASK_DETAIL, taskID);
             // this is wear our new model and old model is mapping (so serviceName in ExperimentData
and service name in ServiceDescriptor
             // has to be same.
 
             // 1. Get the Task from the task ID and construct the Job object and save it
in to registry
             // 2. Add another property to jobExecutionContext and read them inside the provider
and use it.
-            String serviceName = configurationData.getApplicationId();
+            String serviceName = taskData.getApplicationId();
         if (serviceName == null) {
             throw new GFacException("Error executing the job because there is not Application
Name in this Experiment");
         }
@@ -139,7 +141,7 @@ public class GFacImpl implements GFac {
             GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),
airavataAPI, configurationProperties);
 
             jobExecutionContext = new JobExecutionContext(gFacConfiguration, serviceName);
-            jobExecutionContext.setConfigurationData(configurationData);
+            jobExecutionContext.setTaskData(taskData);
             
             ApplicationContext applicationContext = new ApplicationContext();
             applicationContext.setApplicationDeploymentDescription(applicationDescription);
@@ -147,8 +149,7 @@ public class GFacImpl implements GFac {
             applicationContext.setServiceDescription(serviceDescription);
             jobExecutionContext.setApplicationContext(applicationContext);
 
-
-            Map<String, String> experimentInputs = configurationData.getExperimentInputs();
+            List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
             jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getMessageContext(experimentInputs,
                     serviceDescription.getType().getInputParametersArray())));
 
@@ -160,7 +161,6 @@ public class GFacImpl implements GFac {
 
             addSecurityContext(hostDescription, configurationProperties, jobExecutionContext);
 
-
             submitJob(jobExecutionContext);
         } catch (Exception e) {
             log.error("Error inovoking the job with experiment ID: " + experimentID);

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
index 55cf2f7..0f8eed5 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
@@ -48,17 +48,14 @@ import org.apache.airavata.gfac.external.GridFtp;
 import org.apache.airavata.gfac.provider.GFacProviderException;
 import org.apache.airavata.gfac.utils.GFacUtils;
 import org.apache.airavata.gfac.utils.OutputUtils;
-import org.apache.airavata.model.experiment.ConfigurationData;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.GlobusHostType;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
 import org.apache.airavata.schemas.gfac.StringArrayType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
 import org.apache.airavata.schemas.gfac.URIArrayType;
 import org.apache.airavata.schemas.gfac.URIParameterType;
 import org.apache.airavata.schemas.gfac.UnicoreHostType;
-import org.apache.airavata.schemas.wec.ApplicationOutputDataHandlingDocument.ApplicationOutputDataHandling;
-import org.apache.airavata.schemas.wec.ContextHeaderDocument;
 import org.ietf.jgss.GSSCredential;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -179,9 +176,9 @@ public class GridFTPOutputHandler implements GFacHandler {
                                 "and ApplicationDescriptor output Parameter Names");
                     }
                     // If users has given an output Data path to download the output files
this will download the file on machine where GFac is installed
-                    ConfigurationData configurationData =  jobExecutionContext.getConfigurationData();
-                    if(configurationData != null && configurationData.getAdvanceOutputDataHandling()
!= null){
-                    	String outputDataDirectory = configurationData.getAdvanceOutputDataHandling().getOutputdataDir();
+                    TaskDetails taskData =  jobExecutionContext.getTaskData();
+                    if(taskData != null && taskData.getAdvancedOutputDataHandling()
!= null){
+                    	String outputDataDirectory = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
                             if(outputDataDirectory != null && !"".equals(outputDataDirectory)){
                                 stageOutputFiles(jobExecutionContext,outputDataDirectory);
                             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
index 2671bfa..3339beb 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
@@ -433,13 +433,13 @@ public class BESProvider implements GFacProvider {
         }
     }
 
+    //FIXME: Get user details
     private String getUserName(JobExecutionContext context) {
-        if (context.getConfigurationData()!= null) {
-            return context.getConfigurationData().getBasicMetadata().getUserName();
-        } else {
-            return "";
-        }
-
+//        if (context.getConfigurationData()!= null) {
+//            return context.getConfigurationData().getBasicMetadata().getUserName();
+//        } else {
+           return "";
+//        }
     }
 
     protected ActivityStatusType getStatus(FactoryClient fc, EndpointReferenceType activityEpr)

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
index b9d7422..d88cddf 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
@@ -112,7 +112,7 @@ public class ApplicationProcessor {
 	}
 	
 	public static String getUserNameFromContext(JobExecutionContext jobContext) {
-		if(jobContext.getConfigurationData() == null)
+		if(jobContext.getTaskData() == null)
 			return null;
 		//FIXME: Discuss to get user and change this
 		return "admin";

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
index e008f37..a88db7e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
@@ -35,6 +35,7 @@ import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.provider.GFacProviderException;
 import org.apache.airavata.model.experiment.ConfigurationData;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.StringArrayType;
@@ -231,9 +232,9 @@ public class DataTransferrer {
 	}
 	
 	private String getDownloadLocation() {
-		ConfigurationData configurationData = jobContext.getConfigurationData();
-		if (configurationData != null && configurationData.getAdvanceOutputDataHandling()
!= null) {
-			String outputDataDirectory = configurationData.getAdvanceOutputDataHandling().getOutputdataDir();
+		TaskDetails taskData = jobContext.getTaskData();
+		if (taskData != null && taskData.getAdvancedOutputDataHandling() != null) {
+			String outputDataDirectory = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
 			return outputDataDirectory;
 		}
 		return null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
index 83f28f0..61e713a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
@@ -23,11 +23,10 @@ package org.apache.airavata.gfac.provider.utils;
 
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.provider.GFacProviderException;
-import org.apache.airavata.model.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.experiment.ConfigurationData;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.QueueType;
-import org.apache.airavata.schemas.wec.ContextHeaderDocument;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType;
 import org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.NumberOfProcessesType;
 
@@ -41,9 +40,9 @@ public class ResourceProcessor {
 				.getType();
 		
 		createMemory(value, appDepType);
-		ConfigurationData configurationData = context.getConfigurationData();
-	    if(configurationData != null && configurationData.isSetComputationalResourceScheduling()){
-	    	ComputationalResourceScheduling computionResource= configurationData.getComputationalResourceScheduling();
+		TaskDetails taskData = context.getTaskData();
+	    if(taskData != null && taskData.isSetTaskScheduling()){
+	    	ComputationalResourceScheduling computionResource= taskData.getTaskScheduling();
                 try {
                     int cpuCount = computionResource.getTotalCPUCount();
                     if(cpuCount>0){

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GFacUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GFacUtils.java
index 3f572af..55df7fd 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GFacUtils.java
@@ -38,6 +38,7 @@ import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
+import org.apache.airavata.model.workspace.experiment.DataObjectType;
 import org.apache.airavata.registry.api.workflow.ApplicationJob;
 import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
 import org.apache.airavata.schemas.gfac.BooleanArrayType;
@@ -165,181 +166,157 @@ public class GFacUtils {
         return buf.toString();
     }
 
-    public static ActualParameter getInputActualParameter(Parameter parameter, OMElement
element) {
-        OMElement innerelement = null;
+    public static ActualParameter getInputActualParameter(Parameter parameter, DataObjectType
element) {
         ActualParameter actualParameter = new ActualParameter();
         if ("String".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(StringParameterType.type);
-            if (!"".equals(element.getText())) {
-                ((StringParameterType) actualParameter.getType()).setValue(element.getText());
-            } else if (element.getChildrenWithLocalName("value").hasNext()) {
-                innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
-                ((StringParameterType) actualParameter.getType()).setValue(innerelement.getText());
-            } else {
+            if (!"".equals(element.getValue())) {
+                ((StringParameterType) actualParameter.getType()).setValue(element.getValue());
+            }  else {
                 ((StringParameterType) actualParameter.getType()).setValue("");
             }
         } else if ("Double".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(DoubleParameterType.type);
-            if (!"".equals(element.getText())) {
-                ((DoubleParameterType) actualParameter.getType()).setValue(new Double(innerelement.getText()));
-            } else {
-                innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
-                ((DoubleParameterType) actualParameter.getType()).setValue(new Double(innerelement.getText()));
-            }
+            if (!"".equals(element.getValue())) {
+                ((DoubleParameterType) actualParameter.getType()).setValue(new Double(element.getValue()));
+            } 
         } else if ("Integer".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(IntegerParameterType.type);
-            if (!"".equals(element.getText())) {
-                ((IntegerParameterType) actualParameter.getType()).setValue(new Integer(element.getText()));
-            } else {
-                innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
-                ((IntegerParameterType) actualParameter.getType()).setValue(new Integer(innerelement.getText()));
-            }
+            if (!"".equals(element.getValue())) {
+                ((IntegerParameterType) actualParameter.getType()).setValue(new Integer(element.getValue()));
+            } 
         } else if ("Float".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(FloatParameterType.type);
-            if (!"".equals(element.getText())) {
-                ((FloatParameterType) actualParameter.getType()).setValue(new Float(element.getText()));
-            } else {
-                innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
-                ((FloatParameterType) actualParameter.getType()).setValue(new Float(innerelement.getText()));
-            }
+            if (!"".equals(element.getValue())) {
+                ((FloatParameterType) actualParameter.getType()).setValue(new Float(element.getValue()));
+            } 
         } else if ("Boolean".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(BooleanParameterType.type);
-            if (!"".equals(element.getText())) {
-                ((BooleanParameterType) actualParameter.getType()).setValue(new Boolean(element.getText()));
-            } else {
-                innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
-                ((BooleanParameterType) actualParameter.getType()).setValue(Boolean.parseBoolean(innerelement.getText()));
-            }
+            if (!"".equals(element.getValue())) {
+                ((BooleanParameterType) actualParameter.getType()).setValue(new Boolean(element.getValue()));
+            } 
         } else if ("File".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(FileParameterType.type);
-            if (!"".equals(element.getText())) {
-                ((FileParameterType) actualParameter.getType()).setValue(element.getText());
-            } else {
-                innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
-                ((FileParameterType) actualParameter.getType()).setValue(innerelement.getText());
-            }
+            if (!"".equals(element.getValue())) {
+                ((FileParameterType) actualParameter.getType()).setValue(element.getValue());
+            } 
         } else if ("URI".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(URIParameterType.type);
-            if (!"".equals(element.getText())) {
-                ((URIParameterType) actualParameter.getType()).setValue(element.getText());
-            } else if (element.getChildrenWithLocalName("value").hasNext()) {
-                innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
-                System.out.println(actualParameter.getType().toString());
-                log.debug(actualParameter.getType().toString());
-                ((URIParameterType) actualParameter.getType()).setValue(innerelement.getText());
+            if (!"".equals(element.getValue())) {
+                ((URIParameterType) actualParameter.getType()).setValue(element.getValue());
             } else {
                 ((URIParameterType) actualParameter.getType()).setValue("");
             }
-        } else if ("StringArray".equals(parameter.getParameterType().getName())) {
-            actualParameter = new ActualParameter(StringArrayType.type);
-            Iterator value = element.getChildrenWithLocalName("value");
-            int i = 0;
-            if (!"".equals(element.getText())) {
-                String[] list = StringUtil.getElementsFromString(element.getText());
-                for (String arrayValue : list) {
-                    ((StringArrayType) actualParameter.getType()).insertValue(i++, arrayValue);
-                }
-            } else {
-                while (value.hasNext()) {
-                    innerelement = (OMElement) value.next();
-                    ((StringArrayType) actualParameter.getType()).insertValue(i++, innerelement.getText());
-                }
-            }
-        } else if ("DoubleArray".equals(parameter.getParameterType().getName())) {
-            actualParameter = new ActualParameter(DoubleArrayType.type);
-            Iterator value = element.getChildrenWithLocalName("value");
-            int i = 0;
-            if (!"".equals(element.getText())) {
-                String[] list = StringUtil.getElementsFromString(element.getText());
-                for (String arrayValue : list) {
-                    ((DoubleArrayType) actualParameter.getType()).insertValue(i++, new Double(arrayValue));
-                }
-            } else {
-                while (value.hasNext()) {
-                    innerelement = (OMElement) value.next();
-                    ((DoubleArrayType) actualParameter.getType()).insertValue(i++, new Double(innerelement.getText()));
-                }
-            }
-
-        } else if ("IntegerArray".equals(parameter.getParameterType().getName())) {
-            actualParameter = new ActualParameter(IntegerArrayType.type);
-            Iterator value = element.getChildrenWithLocalName("value");
-            int i = 0;
-            if (!"".equals(element.getText())) {
-                String[] list = StringUtil.getElementsFromString(element.getText());
-                for (String arrayValue : list) {
-                    ((IntegerArrayType) actualParameter.getType()).insertValue(i++, new Integer(arrayValue));
-                }
-            } else {
-                while (value.hasNext()) {
-                    innerelement = (OMElement) value.next();
-                    ((IntegerArrayType) actualParameter.getType()).insertValue(i++, new Integer(innerelement.getText()));
-                }
-            }
-        } else if ("FloatArray".equals(parameter.getParameterType().getName())) {
-            actualParameter = new ActualParameter(FloatArrayType.type);
-            Iterator value = element.getChildrenWithLocalName("value");
-            int i = 0;
-            if (!"".equals(element.getText())) {
-                String[] list = StringUtil.getElementsFromString(element.getText());
-                for (String arrayValue : list) {
-                    ((FloatArrayType) actualParameter.getType()).insertValue(i++, new Float(arrayValue));
-                }
-            } else {
-
-                while (value.hasNext()) {
-                    innerelement = (OMElement) value.next();
-                    ((FloatArrayType) actualParameter.getType()).insertValue(i++, new Float(innerelement.getText()));
-                }
-            }
-        } else if ("BooleanArray".equals(parameter.getParameterType().getName())) {
-            actualParameter = new ActualParameter(BooleanArrayType.type);
-            Iterator value = element.getChildrenWithLocalName("value");
-            int i = 0;
-            if (!"".equals(element.getText())) {
-                String[] list = StringUtil.getElementsFromString(element.getText());
-                for (String arrayValue : list) {
-                    ((BooleanArrayType) actualParameter.getType()).insertValue(i++, new Boolean(arrayValue));
-                }
-            } else {
-
-                while (value.hasNext()) {
-                    innerelement = (OMElement) value.next();
-                    ((BooleanArrayType) actualParameter.getType()).insertValue(i++, new Boolean(innerelement.getText()));
-                }
-            }
-        } else if ("FileArray".equals(parameter.getParameterType().getName())) {
-            actualParameter = new ActualParameter(FileArrayType.type);
-            Iterator value = element.getChildrenWithLocalName("value");
-            int i = 0;
-            if (!"".equals(element.getText())) {
-                String[] list = StringUtil.getElementsFromString(element.getText());
-                for (String arrayValue : list) {
-                    ((FileArrayType) actualParameter.getType()).insertValue(i++, arrayValue);
-                }
-            } else {
-
-                while (value.hasNext()) {
-                    innerelement = (OMElement) value.next();
-                    ((FileArrayType) actualParameter.getType()).insertValue(i++, innerelement.getText());
-                }
-            }
-        } else if ("URIArray".equals(parameter.getParameterType().getName())) {
-            actualParameter = new ActualParameter(URIArrayType.type);
-            Iterator value = element.getChildrenWithLocalName("value");
-            int i = 0;
-            if (!"".equals(element.getText())) {
-                String[] list = StringUtil.getElementsFromString(element.getText());
-                for (String arrayValue : list) {
-                    ((URIArrayType) actualParameter.getType()).insertValue(i++, arrayValue);
-                }
-            } else {
-
-                while (value.hasNext()) {
-                    innerelement = (OMElement) value.next();
-                    ((URIArrayType) actualParameter.getType()).insertValue(i++, innerelement.getText());
-                }
-            }
+//        } else if ("StringArray".equals(parameter.getParameterType().getName())) {
+//            actualParameter = new ActualParameter(StringArrayType.type);
+//            Iterator value = element.getChildrenWithLocalName("value");
+//            int i = 0;
+//            if (!"".equals(element.getText())) {
+//                String[] list = StringUtil.getElementsFromString(element.getText());
+//                for (String arrayValue : list) {
+//                    ((StringArrayType) actualParameter.getType()).insertValue(i++, arrayValue);
+//                }
+//            } else {
+//                while (value.hasNext()) {
+//                    innerelement = (OMElement) value.next();
+//                    ((StringArrayType) actualParameter.getType()).insertValue(i++, innerelement.getText());
+//                }
+//            }
+//        } else if ("DoubleArray".equals(parameter.getParameterType().getName())) {
+//            actualParameter = new ActualParameter(DoubleArrayType.type);
+//            Iterator value = element.getChildrenWithLocalName("value");
+//            int i = 0;
+//            if (!"".equals(element.getText())) {
+//                String[] list = StringUtil.getElementsFromString(element.getText());
+//                for (String arrayValue : list) {
+//                    ((DoubleArrayType) actualParameter.getType()).insertValue(i++, new
Double(arrayValue));
+//                }
+//            } else {
+//                while (value.hasNext()) {
+//                    innerelement = (OMElement) value.next();
+//                    ((DoubleArrayType) actualParameter.getType()).insertValue(i++, new
Double(innerelement.getText()));
+//                }
+//            }
+//
+//        } else if ("IntegerArray".equals(parameter.getParameterType().getName())) {
+//            actualParameter = new ActualParameter(IntegerArrayType.type);
+//            Iterator value = element.getChildrenWithLocalName("value");
+//            int i = 0;
+//            if (!"".equals(element.getText())) {
+//                String[] list = StringUtil.getElementsFromString(element.getText());
+//                for (String arrayValue : list) {
+//                    ((IntegerArrayType) actualParameter.getType()).insertValue(i++, new
Integer(arrayValue));
+//                }
+//            } else {
+//                while (value.hasNext()) {
+//                    innerelement = (OMElement) value.next();
+//                    ((IntegerArrayType) actualParameter.getType()).insertValue(i++, new
Integer(innerelement.getText()));
+//                }
+//            }
+//        } else if ("FloatArray".equals(parameter.getParameterType().getName())) {
+//            actualParameter = new ActualParameter(FloatArrayType.type);
+//            Iterator value = element.getChildrenWithLocalName("value");
+//            int i = 0;
+//            if (!"".equals(element.getText())) {
+//                String[] list = StringUtil.getElementsFromString(element.getText());
+//                for (String arrayValue : list) {
+//                    ((FloatArrayType) actualParameter.getType()).insertValue(i++, new Float(arrayValue));
+//                }
+//            } else {
+//
+//                while (value.hasNext()) {
+//                    innerelement = (OMElement) value.next();
+//                    ((FloatArrayType) actualParameter.getType()).insertValue(i++, new Float(innerelement.getText()));
+//                }
+//            }
+//        } else if ("BooleanArray".equals(parameter.getParameterType().getName())) {
+//            actualParameter = new ActualParameter(BooleanArrayType.type);
+//            Iterator value = element.getChildrenWithLocalName("value");
+//            int i = 0;
+//            if (!"".equals(element.getText())) {
+//                String[] list = StringUtil.getElementsFromString(element.getText());
+//                for (String arrayValue : list) {
+//                    ((BooleanArrayType) actualParameter.getType()).insertValue(i++, new
Boolean(arrayValue));
+//                }
+//            } else {
+//
+//                while (value.hasNext()) {
+//                    innerelement = (OMElement) value.next();
+//                    ((BooleanArrayType) actualParameter.getType()).insertValue(i++, new
Boolean(innerelement.getText()));
+//                }
+//            }
+//        } else if ("FileArray".equals(parameter.getParameterType().getName())) {
+//            actualParameter = new ActualParameter(FileArrayType.type);
+//            Iterator value = element.getChildrenWithLocalName("value");
+//            int i = 0;
+//            if (!"".equals(element.getText())) {
+//                String[] list = StringUtil.getElementsFromString(element.getText());
+//                for (String arrayValue : list) {
+//                    ((FileArrayType) actualParameter.getType()).insertValue(i++, arrayValue);
+//                }
+//            } else {
+//
+//                while (value.hasNext()) {
+//                    innerelement = (OMElement) value.next();
+//                    ((FileArrayType) actualParameter.getType()).insertValue(i++, innerelement.getText());
+//                }
+//            }
+//        } else if ("URIArray".equals(parameter.getParameterType().getName())) {
+//            actualParameter = new ActualParameter(URIArrayType.type);
+//            Iterator value = element.getChildrenWithLocalName("value");
+//            int i = 0;
+//            if (!"".equals(element.getText())) {
+//                String[] list = StringUtil.getElementsFromString(element.getText());
+//                for (String arrayValue : list) {
+//                    ((URIArrayType) actualParameter.getType()).insertValue(i++, arrayValue);
+//                }
+//            } else {
+//
+//                while (value.hasNext()) {
+//                    innerelement = (OMElement) value.next();
+//                    ((URIArrayType) actualParameter.getType()).insertValue(i++, innerelement.getText());
+//                }
+//            }
         }
         return actualParameter;
     }
@@ -582,12 +559,15 @@ public class GFacUtils {
         }
     }
 
-    public static Map<String, Object> getMessageContext(Map<String, String> experimentData,
+    public static Map<String, Object> getMessageContext(List<DataObjectType>
experimentData,
                                                         Parameter[] parameters) throws GFacException
{
         HashMap<String, Object> stringObjectHashMap = new HashMap<String, Object>();
-
+        Map<String,DataObjectType> map = new HashMap<String,DataObjectType>();
+        for(DataObjectType objectType : experimentData){
+        	map.put(objectType.getKey(), objectType);
+        }
         for (int i = 0; i < parameters.length; i++) {
-            String input = experimentData.get(parameters[i].getParameterName());
+        	DataObjectType input = map.get(parameters[i].getParameterName());
             if (input != null) {
                 stringObjectHashMap.put(parameters[i].getParameterName(), GFacUtils.getInputActualParameter(parameters[i],
input));
             } else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/73222470/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
index 16b1f3e..d54296b 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
@@ -32,8 +32,9 @@ import org.apache.airavata.gfac.ToolsException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.context.MessageContext;
 import org.apache.airavata.gfac.provider.GFacProviderException;
-import org.apache.airavata.model.experiment.ComputationalResourceScheduling;
 import org.apache.airavata.model.experiment.ConfigurationData;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.schemas.gfac.FileArrayType;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.NameValuePairType;
@@ -110,9 +111,9 @@ public class GramRSLGenerator {
         }
         // Using the workflowContext Header values if user provided them in the request and
overwrite the default values in DD
         //todo finish the scheduling based on workflow execution context
-        ConfigurationData configurationData = context.getConfigurationData();
-        if(configurationData != null && configurationData.getComputationalResourceScheduling()
!= null){
-        	 ComputationalResourceScheduling computionnalResource = configurationData.getComputationalResourceScheduling();
+        TaskDetails taskData = context.getTaskData();
+        if(taskData != null && taskData.isSetTaskScheduling()){
+        	 ComputationalResourceScheduling computionnalResource = taskData.getTaskScheduling();
                 try {
                     int cpuCount = computionnalResource.getTotalCPUCount();
                     if(cpuCount>0){


Mime
View raw message