airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: Replaced DataObjectType with Input and Output DataObjectType
Date Fri, 07 Nov 2014 00:35:19 GMT
Repository: airavata
Updated Branches:
  refs/heads/gfac_appcatalog_int 82127c7b3 -> 4b27ce8a0


Replaced DataObjectType with Input and Output DataObjectType


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

Branch: refs/heads/gfac_appcatalog_int
Commit: 4b27ce8a0b8a5979fb4ce82f9573b00b3f35ea82
Parents: 82127c7
Author: shamrath <shameerainfo@gmail.com>
Authored: Thu Nov 6 19:35:11 2014 -0500
Committer: shamrath <shameerainfo@gmail.com>
Committed: Thu Nov 6 19:35:11 2014 -0500

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   | 72 +++++++++++++----
 .../apache/airavata/integration/BaseCaseIT.java | 49 ++++++------
 .../airavata/integration/DataRetrievalIT.java   | 15 ++--
 .../airavata/integration/SimpleEchoIT.java      | 23 +++---
 .../engine/interpretor/WorkflowInterpreter.java | 81 ++++++++++----------
 5 files changed, 140 insertions(+), 100 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/4b27ce8a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 810ffcc..180ed78 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -21,14 +21,23 @@
 
 package org.apache.airavata.api.server.handler;
 
-import org.airavata.appcatalog.cpi.*;
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.airavata.appcatalog.cpi.ApplicationDeployment;
+import org.airavata.appcatalog.cpi.ComputeResource;
+import org.airavata.appcatalog.cpi.GwyResourceProfile;
+import org.airavata.appcatalog.cpi.WorkflowCatalog;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
-import org.apache.aiaravata.application.catalog.data.resources.*;
+import org.apache.aiaravata.application.catalog.data.resources.AbstractResource;
+import org.apache.aiaravata.application.catalog.data.resources.CloudSubmissionResource;
+import org.apache.aiaravata.application.catalog.data.resources.GridftpDataMovementResource;
+import org.apache.aiaravata.application.catalog.data.resources.LocalDataMovementResource;
+import org.apache.aiaravata.application.catalog.data.resources.LocalSubmissionResource;
+import org.apache.aiaravata.application.catalog.data.resources.ScpDataMovementResource;
+import org.apache.aiaravata.application.catalog.data.resources.SshJobSubmissionResource;
 import org.apache.aiaravata.application.catalog.data.util.AppCatalogThriftConversion;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.airavataAPIConstants;
-import org.apache.airavata.api.server.util.AiravataServerThreadPoolExecutor;
-import org.apache.airavata.api.server.util.DataModelUtils;
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.logger.AiravataLogger;
@@ -44,31 +53,60 @@ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
-import org.apache.airavata.model.error.*;
+import org.apache.airavata.model.error.AiravataClientConnectException;
+import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.error.AiravataErrorType;
+import org.apache.airavata.model.error.AiravataSystemException;
+import org.apache.airavata.model.error.ExperimentNotFoundException;
+import org.apache.airavata.model.error.InvalidRequestException;
+import org.apache.airavata.model.error.ProjectNotFoundException;
 import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent;
 import org.apache.airavata.model.messaging.event.MessageType;
-import org.apache.airavata.model.util.ExecutionType;
 import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
 import org.apache.airavata.orchestrator.client.OrchestratorClientFactory;
 import org.apache.airavata.orchestrator.cpi.OrchestratorService;
 import org.apache.airavata.orchestrator.cpi.OrchestratorService.Client;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.*;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.apache.airavata.registry.cpi.ParentDataType;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.registry.cpi.utils.Constants;
-import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.TaskDetailConstants;
-import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants;
 import org.apache.airavata.workflow.catalog.WorkflowCatalogFactory;
-import org.apache.airavata.workflow.engine.WorkflowEngine;
-import org.apache.airavata.workflow.engine.WorkflowEngineException;
-import org.apache.airavata.workflow.engine.WorkflowEngineFactory;
 import org.apache.thrift.TException;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 public class AiravataServerHandler implements Airavata.Iface {
     private static final AiravataLogger logger = AiravataLoggerFactory.getLogger(AiravataServerHandler.class);
@@ -897,14 +935,14 @@ public class AiravataServerHandler implements Airavata.Iface {
     }
 
     @Override
-    public List<DataObjectType> getExperimentOutputs(String airavataExperimentId) throws
TException {
+    public List<OutputDataObjectType> getExperimentOutputs(String airavataExperimentId)
throws TException {
         try {
             registry = RegistryFactory.getDefaultRegistry();
             if (!registry.isExist(RegistryModelType.EXPERIMENT, airavataExperimentId)){
                 logger.errorId(airavataExperimentId, "Get experiment outputs failed, experiment
{} doesn't exit.", airavataExperimentId);
                 throw new ExperimentNotFoundException("Requested experiment id " + airavataExperimentId
+ " does not exist in the system..");
             }
-            return (List<DataObjectType>)registry.get(RegistryModelType.EXPERIMENT_OUTPUT,
airavataExperimentId);
+            return (List<OutputDataObjectType>)registry.get(RegistryModelType.EXPERIMENT_OUTPUT,
airavataExperimentId);
         } catch (Exception e) {
             logger.errorId(airavataExperimentId, "Error while retrieving the experiment outputs",
e);
             AiravataSystemException exception = new AiravataSystemException();

http://git-wip-us.apache.org/repos/asf/airavata/blob/4b27ce8a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
index 0b44013..17107cf 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
@@ -21,34 +21,35 @@
 
 package org.apache.airavata.integration;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import junit.framework.Assert;
-
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.client.tools.DocumentCreatorNew;
 import org.apache.airavata.integration.tools.DocumentCreatorNew;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.DataObjectType;
-import org.apache.airavata.model.workspace.experiment.DataType;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+//import org.apache.airavata.client.tools.DocumentCreatorNew;
 //import org.apache.airavata.workflow.model.wf.Workflow;
 //import org.apache.airavata.ws.monitor.EventData;
 //import org.apache.airavata.ws.monitor.EventDataListenerAdapter;
 //import org.apache.airavata.ws.monitor.EventDataRepository;
 //import org.apache.airavata.ws.monitor.Monitor;
 //import org.apache.airavata.ws.monitor.MonitorUtil;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
 
 /**
  * Integration test class.
@@ -87,16 +88,16 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
         log.info("Running job in trestles...");
         DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
         documentCreator.createPBSDocsForOGCE_Echo();
-        List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
-        DataObjectType input = new DataObjectType();
-        input.setKey("echo_input");
+        List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
+        InputDataObjectType input = new InputDataObjectType();
+        input.setName("echo_input");
         input.setType(DataType.STRING);
         input.setValue("echo_output=Hello World");
         exInputs.add(input);
 
-        List<DataObjectType> exOut = new ArrayList<DataObjectType>();
-        DataObjectType output = new DataObjectType();
-        output.setKey("echo_output");
+        List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
+        OutputDataObjectType output = new OutputDataObjectType();
+        output.setName("echo_output");
         output.setType(DataType.STRING);
         output.setValue("");
         exOut.add(output);
@@ -161,16 +162,16 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
         log.info("Running job in Stampede...");
         DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
         documentCreator.createSlurmDocs();
-        List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
-        DataObjectType input = new DataObjectType();
-        input.setKey("echo_input");
+        List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
+        InputDataObjectType input = new InputDataObjectType();
+        input.setName("echo_input");
         input.setType(DataType.STRING);
         input.setValue("echo_output=Hello World");
         exInputs.add(input);
 
-        List<DataObjectType> exOut = new ArrayList<DataObjectType>();
-        DataObjectType output = new DataObjectType();
-        output.setKey("echo_output");
+        List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
+        OutputDataObjectType output = new OutputDataObjectType();
+        output.setName("echo_output");
         output.setType(DataType.STRING);
         output.setValue("");
         exOut.add(output);

http://git-wip-us.apache.org/repos/asf/airavata/blob/4b27ce8a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
index af9a729..c768b68 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
@@ -25,6 +25,9 @@ import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.api.Airavata.Client;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.integration.tools.DocumentCreatorNew;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.error.*;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
@@ -176,16 +179,16 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
 	public String runExperiment(String user, String project) throws ApplicationSettingsException,
AiravataClientConnectException,
 			InvalidRequestException, AiravataClientException,
 			AiravataSystemException, TException, ExperimentNotFoundException {
-		List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
-		DataObjectType input = new DataObjectType();
-		input.setKey("echo_input");
+		List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
+        InputDataObjectType input = new InputDataObjectType();
+        input.setName("echo_input");
 		input.setType(DataType.STRING);
 		input.setValue("echo_output=Hello World");
 		exInputs.add(input);
 
-		List<DataObjectType> exOut = new ArrayList<DataObjectType>();
-		DataObjectType output = new DataObjectType();
-		output.setKey("echo_output");
+		List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
+        OutputDataObjectType output = new OutputDataObjectType();
+		output.setName("echo_output");
 		output.setType(DataType.STRING);
 		output.setValue("");
 		exOut.add(output);

http://git-wip-us.apache.org/repos/asf/airavata/blob/4b27ce8a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
index 499dcda..81d1383 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
@@ -21,16 +21,14 @@
 
 package org.apache.airavata.integration;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.airavata.integration.tools.DocumentCreatorNew;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.DataObjectType;
-import org.apache.airavata.model.workspace.experiment.DataType;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
 import org.slf4j.Logger;
@@ -38,6 +36,9 @@ import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
+import java.util.ArrayList;
+import java.util.List;
+
 public class SimpleEchoIT extends SingleAppIntegrationTestBase {
     private final static Logger log = LoggerFactory.getLogger(SimpleEchoIT.class);
 
@@ -61,16 +62,16 @@ public class SimpleEchoIT extends SingleAppIntegrationTestBase {
         String appId = hostAndappId.split(",")[1];
         String hostId = hostAndappId.split(",")[0];
         
-        List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
-        DataObjectType input = new DataObjectType();
-        input.setKey("echo_input");
+        List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
+        InputDataObjectType input = new InputDataObjectType();
+        input.setName("echo_input");
         input.setType(DataType.STRING);
         input.setValue("echo_output=Hello World");
         exInputs.add(input);
 
-        List<DataObjectType> exOut = new ArrayList<DataObjectType>();
-        DataObjectType output = new DataObjectType();
-        output.setKey("echo_output");
+        List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
+        OutputDataObjectType output = new OutputDataObjectType();
+        output.setName("echo_output");
         output.setType(DataType.STRING);
         output.setValue("");
         exOut.add(output);

http://git-wip-us.apache.org/repos/asf/airavata/blob/4b27ce8a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
index 59681c7..fa4fd32 100644
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
+++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
@@ -21,28 +21,7 @@
 
 package org.apache.airavata.workflow.engine.interpretor;
 
-import java.net.URL;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.xml.namespace.QName;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.apache.airavata.api.Airavata;
+import com.google.common.eventbus.Subscribe;
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataUtils;
@@ -52,6 +31,8 @@ import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.common.utils.listener.AbstractActivityListener;
 import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.Publisher;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent;
 import org.apache.airavata.model.messaging.event.MessageType;
 import org.apache.airavata.model.messaging.event.TaskOutputChangeEvent;
@@ -59,7 +40,6 @@ import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent;
 import org.apache.airavata.model.messaging.event.WorkflowIdentifier;
 import org.apache.airavata.model.messaging.event.WorkflowNodeStatusChangeEvent;
 import org.apache.airavata.model.util.ExperimentModelUtil;
-import org.apache.airavata.model.workspace.experiment.DataObjectType;
 import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.ExperimentState;
@@ -125,10 +105,27 @@ import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xmlpull.infoset.XmlElement;
-
 import xsul5.XmlConstants;
 
-import com.google.common.eventbus.Subscribe;
+import javax.xml.namespace.QName;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.net.URL;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
 
 public class WorkflowInterpreter implements AbstractActivityListener{
     private static final Logger log = LoggerFactory.getLogger(WorkflowInterpreter.class);
@@ -238,10 +235,10 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 		try {
 			this.getWorkflow().setExecutionState(WorkflowExecutionState.RUNNING);
 			ArrayList<Node> inputNodes = this.getInputNodesDynamically();
-			List<DataObjectType> experimentInputs = experiment.getExperimentInputs();
+			List<InputDataObjectType> experimentInputs = experiment.getExperimentInputs();
 			Map<String,String> inputDataStrings=new HashMap<String, String>();
-			for (DataObjectType dataObjectType : experimentInputs) {
-				inputDataStrings.put(dataObjectType.getKey(), dataObjectType.getValue());
+			for (InputDataObjectType dataObjectType : experimentInputs) {
+				inputDataStrings.put(dataObjectType.getName(), dataObjectType.getValue());
 			}
 			for (Node node : inputNodes) {
                 publishNodeStatusChange(WorkflowNodeState.EXECUTING,node.getID(),experiment.getExperimentID());
@@ -261,8 +258,8 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 				Object portValue = ((InputNode) node).getDefaultValue();
                 //Saving workflow input Node data before running the workflow
 				WorkflowNodeDetails workflowNode = createWorkflowNodeDetails(node);
-				DataObjectType elem = new DataObjectType();
-				elem.setKey(portId);
+                InputDataObjectType elem = new InputDataObjectType();
+				elem.setName(portId);
 				elem.setValue(portValue==null?null:portValue.toString());
 				workflowNode.addToNodeInputs(elem);
 				getRegistry().update(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNode, workflowNode.getNodeInstanceId());
@@ -508,8 +505,8 @@ public class WorkflowInterpreter implements AbstractActivityListener{
                     String portValue = ((OutputNode) node).getDescription();
 //                    this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowInstanceNodeOutput(workflowInstanceNode,
portname + "=" + portValue);
 //                    this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowNodeType(workflowInstanceNode,
workflowNodeType);
-                    DataObjectType elem = new DataObjectType();
-                    elem.setKey(portname);
+                    OutputDataObjectType elem = new OutputDataObjectType();
+                    elem.setName(portname);
                     elem.setValue(portValue);
 					workflowNodeDetails.addToNodeOutputs(elem);
 					getRegistry().update(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNodeDetails, workflowNodeDetails.getNodeInstanceId());
@@ -572,8 +569,8 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 					throw new WorkFlowInterpreterException("Unable to find output for the node:" + node.getID());
 				}
 				WorkflowNodeDetails workflowNodeDetails = nodeInstanceList.get(node);
-				DataObjectType elem = new DataObjectType();
-				elem.setKey(node.getName());
+                OutputDataObjectType elem = new OutputDataObjectType();
+				elem.setName(node.getName());
 				elem.setValue(val.toString());
 				workflowNodeDetails.addToNodeOutputs(elem);
 				try {
@@ -1061,8 +1058,8 @@ public class WorkflowInterpreter implements AbstractActivityListener{
                     portInputValue = outputData.get(dataPort.getEdge(0).getFromPort().getName());
                 }
 			}
-			DataObjectType elem = new DataObjectType();
-			elem.setKey(dataPort.getName());
+            InputDataObjectType elem = new InputDataObjectType();
+            elem.setName(dataPort.getName());
 			elem.setValue(portInputValue);
 			nodeDetails.addToNodeInputs(elem);
 		}
@@ -1079,8 +1076,8 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 		Map<String, String> outputData = nodeOutputData.get(node);
 		for (DataPort dataPort : outputPorts) {
 			String portInputValue = outputData.get(dataPort.getName());
-			DataObjectType elem = new DataObjectType();
-			elem.setKey(dataPort.getName());
+            OutputDataObjectType elem = new OutputDataObjectType();
+			elem.setName(dataPort.getName());
 			elem.setValue(portInputValue);
 			nodeDetails.addToNodeOutputs(elem);
 		}
@@ -1466,13 +1463,13 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 		if (isTaskAwaiting(taskId)){
         	WorkflowNodeState state=WorkflowNodeState.COMPLETED;
 			Node node = getAwaitingNodeForTask(taskId);
-    		List<DataObjectType> applicationOutputs = taskOutputEvent.getOutput();
+    		List<OutputDataObjectType> applicationOutputs = taskOutputEvent.getOutput();
 			Map<String, String> outputData = new HashMap<String, String>();
-			for (DataObjectType outputObj : applicationOutputs) {
+			for (OutputDataObjectType outputObj : applicationOutputs) {
 				List<DataPort> outputPorts = node.getOutputPorts();
 				for (DataPort dataPort : outputPorts) {
-					if (dataPort.getName().equals(outputObj.getKey())){
-						outputData.put(outputObj.getKey(), outputObj.getValue());
+					if (dataPort.getName().equals(outputObj.getName())){
+						outputData.put(outputObj.getName(), outputObj.getValue());
 					}
 				}
 			}


Mime
View raw message