airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1421951 [1/2] - in /airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/api/ airavata-client/src/main/java/org/apache/airavata/client/impl/ integration-tests/ integration-tests/src/test/java/org/apache/airavata...
Date Fri, 14 Dec 2012 16:03:22 GMT
Author: samindaw
Date: Fri Dec 14 16:02:57 2012
New Revision: 1421951

URL: http://svn.apache.org/viewvc?rev=1421951&view=rev
Log:
review & refactor API objects

Added:
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java
      - copied, changed from r1421909, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java   (with props)
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java
      - copied, changed from r1421909, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodeData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java   (with props)
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java
      - copied, changed from r1421909, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstance.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java
      - copied, changed from r1421909, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java
      - copied, changed from r1421909, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceStatus.java
Removed:
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstance.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodeData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceStatus.java
Modified:
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
    airavata/trunk/modules/integration-tests/derby-start.txt
    airavata/trunk/modules/integration-tests/derby-stop.txt
    airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
    airavata/trunk/modules/registry/airavata-registry-test/src/test/java/org/apache/airavata/registry/api/test/AiravataRegistryAPITest.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodeStatus.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java
    airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/ProvenanceResourceClient.java
    airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
    airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowInstancesList.java
    airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/ProvenanceRegistryResource.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflow.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflowExperiment.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflowNodeElement.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceReader.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceWrite.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowNodeStatusUpdater.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowStatusUpdater.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registrybrowser/nodes/XBayaWorkflowExperimentNode.java

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java Fri Dec 14 16:02:57 2012
@@ -25,7 +25,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 
 /**
  * This interface provide and API to manage all the provenance related methods, get Workflow inputs outputs
@@ -127,14 +127,14 @@ public interface ProvenanceManager {
      * @param status
      * @throws AiravataAPIInvocationException
      */
-	public void setWorkflowInstanceStatus(String experimentId, String workflowInstanceId, ExecutionStatus status) throws AiravataAPIInvocationException;
+	public void setWorkflowInstanceStatus(String experimentId, String workflowInstanceId, State status) throws AiravataAPIInvocationException;
 
     /**
      * Update the status of the Workflow instance
      * @param status
      * @throws AiravataAPIInvocationException
      */
-	public void setWorkflowInstanceStatus(WorkflowInstanceStatus status) throws AiravataAPIInvocationException;
+	public void setWorkflowInstanceStatus(WorkflowExecutionStatus status) throws AiravataAPIInvocationException;
 
     /**
      * Retrieve the status of the Workflow instance
@@ -143,7 +143,7 @@ public interface ProvenanceManager {
      * @return
      * @throws AiravataAPIInvocationException
      */
-	public WorkflowInstanceStatus getWorkflowInstanceStatus(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
+	public WorkflowExecutionStatus getWorkflowInstanceStatus(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
 
     /**
      * Retrieve the status of the Workflow instance
@@ -151,7 +151,7 @@ public interface ProvenanceManager {
      * @return
      * @throws AiravataAPIInvocationException
      */
-	public WorkflowInstanceStatus getWorkflowInstanceStatus(WorkflowInstance workflowInstance) throws AiravataAPIInvocationException;
+	public WorkflowExecutionStatus getWorkflowInstanceStatus(WorkflowExecution workflowInstance) throws AiravataAPIInvocationException;
 
     /**
      * Update the User of the Workflow instance
@@ -301,7 +301,7 @@ public interface ProvenanceManager {
      * @return
      * @throws AiravataAPIInvocationException
      */
-	public WorkflowInstanceData getWorkflowInstanceData(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
+	public WorkflowExecutionData getWorkflowInstanceData(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
 
     /**
      * Retrieve experiment data for a given workflow instance
@@ -309,7 +309,7 @@ public interface ProvenanceManager {
      * @return
      * @throws AiravataAPIInvocationException
      */
-	public WorkflowInstanceData getWorkflowInstanceData(WorkflowInstance workflowInstance) throws AiravataAPIInvocationException;
+	public WorkflowExecutionData getWorkflowInstanceData(WorkflowExecution workflowInstance) throws AiravataAPIInvocationException;
 
     /**
      * Retrieve output node names of a experiment
@@ -320,7 +320,7 @@ public interface ProvenanceManager {
      */
 	public String[] getWorkflowExecutionOutputNames(String experimentId) throws AiravataAPIInvocationException;
 	
-	public void setWorkflowInstanceNodeStatus(String experimentId, String workflowInstaceId, String nodeId, ExecutionStatus status) throws AiravataAPIInvocationException;
+	public void setWorkflowInstanceNodeStatus(String experimentId, String workflowInstaceId, String nodeId, State status) throws AiravataAPIInvocationException;
 	
 	public void setWorkflowInstanceNodeStatus(WorkflowInstanceNodeStatus status) throws AiravataAPIInvocationException;
 	
@@ -330,11 +330,11 @@ public interface ProvenanceManager {
 	
 	public void addExperiment(String projectName, String experimentId, String experimentName) throws AiravataAPIInvocationException;
 	
-	public void addWorkflowInstance(String experimentId, WorkflowInstance workflowInstance) throws AiravataAPIInvocationException;
+	public void addWorkflowInstance(String experimentId, WorkflowExecution workflowInstance) throws AiravataAPIInvocationException;
 	
 	//TODO setup node type for the node & gram data for the node
 
-    public List<WorkflowInstance> getExperimentWorkflowInstances(String experimentId) throws AiravataAPIInvocationException;
+    public List<WorkflowExecution> getExperimentWorkflowInstances(String experimentId) throws AiravataAPIInvocationException;
 
     public void setWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type) throws AiravataAPIInvocationException;
 

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java Fri Dec 14 16:02:57 2012
@@ -32,7 +32,7 @@ import org.apache.airavata.common.except
 import org.apache.airavata.registry.api.AiravataExperiment;
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 
 public class ProvenanceManagerImpl implements ProvenanceManager {
 	private AiravataClient client;
@@ -55,7 +55,7 @@ public class ProvenanceManagerImpl imple
 	public void setWorkflowInstanceNodeInput(String experimentId,
 			String workflowInstanceId, String nodeId, String data)
 			throws AiravataAPIInvocationException {
-		setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowInstance(experimentId, workflowInstanceId), nodeId), data);
+		setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId), data);
 	}
 
 	@Override
@@ -72,14 +72,14 @@ public class ProvenanceManagerImpl imple
 	public void setWorkflowInstanceNodeOutput(String experimentId,
 			String workflowInstanceId, String nodeId, String data)
 			throws AiravataAPIInvocationException {
-		setWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowInstance(experimentId, workflowInstanceId), nodeId), data);
+		setWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId), data);
 		
 	}
 
 	@Override
 	public String getWorkflowInstanceNodeInput(WorkflowInstanceNode node) throws AiravataAPIInvocationException {
 		try {
-			return getClient().getRegistryClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowInstanceId(), node.getNodeId()).getInput();
+			return getClient().getRegistryClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId()).getInput();
 		} catch (Exception e) {
 			throw new AiravataAPIInvocationException(e);
 		}
@@ -88,7 +88,7 @@ public class ProvenanceManagerImpl imple
 	@Override
 	public String getWorkflowInstanceNodeInput(String experimentId, String workflowInstanceId, String nodeId)
 			throws AiravataAPIInvocationException {
-		return getWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowInstance(experimentId, workflowInstanceId), nodeId));
+		return getWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId));
 	}
 	
 	@Override
@@ -104,7 +104,7 @@ public class ProvenanceManagerImpl imple
 	private Map<WorkflowInstanceNode, String> groupNodePortData(List<WorkflowNodeIOData> list) {
 		Map<WorkflowInstanceNode,String> portData=new HashMap<WorkflowInstanceNode, String>();
 		for (WorkflowNodeIOData data : list) {
-			portData.put(new WorkflowInstanceNode(new WorkflowInstance(data.getExperimentId(), data.getWorkflowInstanceId()), data.getNodeId()), data.getValue());
+			portData.put(new WorkflowInstanceNode(new WorkflowExecution(data.getExperimentId(), data.getWorkflowInstanceId()), data.getNodeId()), data.getValue());
 		}
 		return portData;
 	}
@@ -112,7 +112,7 @@ public class ProvenanceManagerImpl imple
 	@Override
 	public String getWorkflowInstanceNodeOutput(WorkflowInstanceNode node) throws AiravataAPIInvocationException {
 		try {
-			return getClient().getRegistryClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowInstanceId(), node.getNodeId()).getOutput();
+			return getClient().getRegistryClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId()).getOutput();
 		} catch (Exception e) {
 			throw new AiravataAPIInvocationException(e);
 		}
@@ -121,7 +121,7 @@ public class ProvenanceManagerImpl imple
 	@Override
 	public String getWorkflowInstanceNodeOutput(String experimentId, String workflowInstanceId, String nodeId)
 			throws AiravataAPIInvocationException {
-		return getWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowInstance(experimentId, workflowInstanceId), nodeId));
+		return getWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId));
 
 	}
 
@@ -137,12 +137,12 @@ public class ProvenanceManagerImpl imple
 	
 	@Override
 	public void setWorkflowInstanceStatus(String experimentId, String workflowInstanceId,
-			ExecutionStatus status) throws AiravataAPIInvocationException {
-		setWorkflowInstanceStatus(new WorkflowInstanceStatus(new WorkflowInstance(experimentId, workflowInstanceId),status));
+			State status) throws AiravataAPIInvocationException {
+		setWorkflowInstanceStatus(new WorkflowExecutionStatus(new WorkflowExecution(experimentId, workflowInstanceId),status));
 	}
 
 	@Override
-	public void setWorkflowInstanceStatus(WorkflowInstanceStatus status)
+	public void setWorkflowInstanceStatus(WorkflowExecutionStatus status)
 			throws AiravataAPIInvocationException {
 		try {
 			getClient().getRegistryClient().updateWorkflowInstanceStatus(status);
@@ -153,7 +153,7 @@ public class ProvenanceManagerImpl imple
 	}
 
 	@Override
-	public WorkflowInstanceStatus getWorkflowInstanceStatus(
+	public WorkflowExecutionStatus getWorkflowInstanceStatus(
 			String experimentId, String workflowInstanceId)
 			throws AiravataAPIInvocationException {
 		try {
@@ -164,10 +164,10 @@ public class ProvenanceManagerImpl imple
 	}
 
 	@Override
-	public WorkflowInstanceStatus getWorkflowInstanceStatus(
-			WorkflowInstance workflowInstance)
+	public WorkflowExecutionStatus getWorkflowInstanceStatus(
+			WorkflowExecution workflowInstance)
 			throws AiravataAPIInvocationException {
-		return getWorkflowInstanceStatus(workflowInstance.getExperimentId(), workflowInstance.getWorkflowInstanceId());
+		return getWorkflowInstanceStatus(workflowInstance.getExperimentId(), workflowInstance.getWorkflowExecutionId());
 	}
 
 	@Override
@@ -270,7 +270,7 @@ public class ProvenanceManagerImpl imple
 	}
 
 	@Override
-	public WorkflowInstanceData getWorkflowInstanceData(String experimentId,
+	public WorkflowExecutionData getWorkflowInstanceData(String experimentId,
 			String workflowInstanceId) throws AiravataAPIInvocationException {
 		try {
 			return getClient().getRegistryClient().getWorkflowInstanceData(workflowInstanceId);
@@ -280,9 +280,9 @@ public class ProvenanceManagerImpl imple
 	}
 
 	@Override
-	public WorkflowInstanceData getWorkflowInstanceData(WorkflowInstance workflowInstance)
+	public WorkflowExecutionData getWorkflowInstanceData(WorkflowExecution workflowInstance)
 			throws AiravataAPIInvocationException {
-		return getWorkflowInstanceData(workflowInstance.getExperimentId(), workflowInstance.getWorkflowInstanceId());
+		return getWorkflowInstanceData(workflowInstance.getExperimentId(), workflowInstance.getWorkflowExecutionId());
 	}
 
 	@Override
@@ -337,7 +337,7 @@ public class ProvenanceManagerImpl imple
 
 	@Override
 	public void setWorkflowInstanceNodeStatus(String experimentId,
-			String workflowInstaceId, String nodeId, ExecutionStatus status)
+			String workflowInstaceId, String nodeId, State status)
 			throws AiravataAPIInvocationException {
 		try {
 			getClient().getRegistryClient().updateWorkflowNodeStatus(workflowInstaceId, nodeId, status);
@@ -361,7 +361,7 @@ public class ProvenanceManagerImpl imple
 	public WorkflowInstanceNodeStatus getWorkflowInstanceNodeStatus(
 			String experimentId, String workflowInstaceId, String nodeId)
 			throws AiravataAPIInvocationException {
-		return getWorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowInstance(experimentId,workflowInstaceId),nodeId));
+		return getWorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowExecution(experimentId,workflowInstaceId),nodeId));
 	}
 
 	@Override
@@ -389,10 +389,10 @@ public class ProvenanceManagerImpl imple
 
 	@Override
 	public void addWorkflowInstance(String experimentId,
-			WorkflowInstance workflowInstance)
+			WorkflowExecution workflowInstance)
 			throws AiravataAPIInvocationException {
 		try {
-			getClient().getRegistryClient().addWorkflowInstance(experimentId, workflowInstance.getWorkflowInstanceId(),workflowInstance.getTemplateName());
+			getClient().getRegistryClient().addWorkflowInstance(experimentId, workflowInstance.getWorkflowExecutionId(),workflowInstance.getTemplateName());
 		} catch (Exception e) {
 			throw new AiravataAPIInvocationException(e);
 		}
@@ -400,7 +400,7 @@ public class ProvenanceManagerImpl imple
 	}
 
     @Override
-    public List<WorkflowInstance> getExperimentWorkflowInstances(String experimentId) throws AiravataAPIInvocationException {
+    public List<WorkflowExecution> getExperimentWorkflowInstances(String experimentId) throws AiravataAPIInvocationException {
         try{
             return getClient().getRegistryClient().getExperimentWorkflowInstances(experimentId);
         }catch (Exception e) {

Modified: airavata/trunk/modules/integration-tests/derby-start.txt
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/integration-tests/derby-start.txt?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/integration-tests/derby-start.txt (original)
+++ airavata/trunk/modules/integration-tests/derby-start.txt Fri Dec 14 16:02:57 2012
@@ -1 +1 @@
-./derby.sh: line 22: cd: /Users/chathuri/airavata/source/trunk_new/modules/integration-tests/target/tests/apache-tomcat-7.0.33/webapps/axis2/WEB-INF/bin: No such file or directory
+cd: 22: can't cd to /home/samindaw/prj-co/airavata/modules/integration-tests/target/tests/apache-tomcat-7.0.33/webapps/axis2/WEB-INF/bin

Modified: airavata/trunk/modules/integration-tests/derby-stop.txt
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/integration-tests/derby-stop.txt?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/integration-tests/derby-stop.txt (original)
+++ airavata/trunk/modules/integration-tests/derby-stop.txt Fri Dec 14 16:02:57 2012
@@ -0,0 +1,2 @@
+./stop-derby.sh: 7: [[: not found
+Does not exist

Modified: airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java (original)
+++ airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java Fri Dec 14 16:02:57 2012
@@ -3,9 +3,9 @@ package org.apache.airavata.integration;
 import junit.framework.Assert;
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.registry.api.workflow.ExperimentData;
-import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodeData;
+import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionData;
+import org.apache.airavata.registry.api.workflow.NodeExecutionData;
 import org.apache.airavata.ws.monitor.MonitorEvent;
 import org.apache.airavata.ws.monitor.MonitorEventData;
 import org.apache.airavata.ws.monitor.MonitorEventListener;
@@ -55,13 +55,13 @@ public class TestMonitorListener impleme
 
         log.info("Verifying output ...");
 
-        List<WorkflowInstanceDataImpl> workflowInstanceData = experimentData.getWorkflowInstanceData();
+        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
 
 //        List<WorkflowInstanceData> workflowInstanceData = experimentData.getWorkflowInstanceData();
 
-        for(WorkflowInstanceDataImpl data:workflowInstanceData){
-            List<WorkflowInstanceNodeData> nodeDataList = data.getNodeDataList();
-            for(WorkflowInstanceNodeData nodeData:nodeDataList){
+        for(WorkflowExecutionDataImpl data:workflowInstanceData){
+            List<NodeExecutionData> nodeDataList = data.getNodeDataList();
+            for(NodeExecutionData nodeData:nodeDataList){
                 Assert.assertEquals("Airavata Test", nodeData.getOutputData().get(0).getValue());
                 Assert.assertEquals(outputVerifyingString, nodeData.getInputData().get(0).getValue());
             }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java Fri Dec 14 16:02:57 2012
@@ -69,10 +69,10 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.exception.gateway.PublishedWorkflowAlreadyExistsException;
 import org.apache.airavata.registry.api.exception.gateway.PublishedWorkflowDoesNotExistsException;
 import org.apache.airavata.registry.api.exception.worker.*;
-import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
+import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
 import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionData;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 import org.apache.xmlbeans.XmlException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -940,17 +940,17 @@ public class AiravataJPARegistry extends
 
 
 	@Override
-	public List<WorkflowInstance> getExperimentWorkflowInstances(
+	public List<WorkflowExecution> getExperimentWorkflowInstances(
 			String experimentId) throws RegistryException {
 		if (!isExperimentExists(experimentId)){
 			throw new ExperimentDoesNotExistsException(experimentId);
 		}
 		ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
 		ExperimentDataResource data = experiment.getData();
-		List<WorkflowInstance> result=new ArrayList<WorkflowInstance>();
+		List<WorkflowExecution> result=new ArrayList<WorkflowExecution>();
 		List<WorkflowDataResource> workflowInstances = data.getWorkflowInstances();
 		for (WorkflowDataResource resource : workflowInstances) {
-			WorkflowInstance workflowInstance = new WorkflowInstance(resource.getExperimentID(), resource.getWorkflowInstanceID());
+			WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
 			workflowInstance.setTemplateName(resource.getTemplateName());
 			result.add(workflowInstance);
 		}
@@ -984,14 +984,14 @@ public class AiravataJPARegistry extends
 
 	@Override
 	public void updateWorkflowInstanceStatus(String instanceId,
-			ExecutionStatus status) throws RegistryException {
+			State status) throws RegistryException {
 		if (!isWorkflowInstanceExists(instanceId, true)){
 			throw new WorkflowInstanceDoesNotExistsException(instanceId);
 		}
 		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
 		Timestamp currentTime = new Timestamp(Calendar.getInstance().getTime().getTime());
 		wi.setStatus(status.toString());
-		if (status==ExecutionStatus.STARTED){
+		if (status==State.STARTED){
 			wi.setStartTime(currentTime);
 		}
 		wi.setLastUpdatedTime(currentTime);
@@ -1000,18 +1000,18 @@ public class AiravataJPARegistry extends
 
 
 	@Override
-	public void updateWorkflowInstanceStatus(WorkflowInstanceStatus status)
+	public void updateWorkflowInstanceStatus(WorkflowExecutionStatus status)
 			throws RegistryException {
-		if (!isWorkflowInstanceExists(status.getWorkflowInstance().getWorkflowInstanceId(), true)){
-			throw new WorkflowInstanceDoesNotExistsException(status.getWorkflowInstance().getWorkflowInstanceId());
+		if (!isWorkflowInstanceExists(status.getWorkflowInstance().getWorkflowExecutionId(), true)){
+			throw new WorkflowInstanceDoesNotExistsException(status.getWorkflowInstance().getWorkflowExecutionId());
 		}
-		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(status.getWorkflowInstance().getWorkflowInstanceId());
+		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(status.getWorkflowInstance().getWorkflowExecutionId());
 		Timestamp currentTime = new Timestamp(status.getStatusUpdateTime().getTime());
         if(status.getExecutionStatus() != null){
             wi.setStatus(status.getExecutionStatus().toString());
         }
 
-		if (status.getExecutionStatus()==ExecutionStatus.STARTED){
+		if (status.getExecutionStatus()==State.STARTED){
 			wi.setStartTime(currentTime);
 		}
 		wi.setLastUpdatedTime(currentTime);
@@ -1020,23 +1020,23 @@ public class AiravataJPARegistry extends
 
 
 	@Override
-	public WorkflowInstanceStatus getWorkflowInstanceStatus(String instanceId)
+	public WorkflowExecutionStatus getWorkflowInstanceStatus(String instanceId)
 			throws RegistryException {
 		if (!isWorkflowInstanceExists(instanceId, true)){
 			throw new WorkflowInstanceDoesNotExistsException(instanceId);
 		}
 		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
-		return new WorkflowInstanceStatus(new WorkflowInstance(wi.getExperimentID(),wi.getWorkflowInstanceID()),wi.getStatus()==null?null:ExecutionStatus.valueOf(wi.getStatus()),wi.getLastUpdatedTime());
+		return new WorkflowExecutionStatus(new WorkflowExecution(wi.getExperimentID(),wi.getWorkflowInstanceID()),wi.getStatus()==null?null:State.valueOf(wi.getStatus()),wi.getLastUpdatedTime());
 	}
 
 
 	@Override
 	public void updateWorkflowNodeInput(WorkflowInstanceNode node, String data)
 			throws RegistryException {
-		if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),true)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(), node.getNodeId());
+		if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(),true)){
+			throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
 		}
-		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId());
+		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
 		NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
 		nodeData.setInputs(data);
 		nodeData.save();
@@ -1046,10 +1046,10 @@ public class AiravataJPARegistry extends
 	@Override
 	public void updateWorkflowNodeOutput(WorkflowInstanceNode node, String data) throws RegistryException {
 		try {
-			if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),true)){
-				throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(), node.getNodeId());
+			if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(),true)){
+				throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
 			}
-			WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId());
+			WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
 			NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
 			nodeData.setOutputs(data);
 			nodeData.save();
@@ -1174,35 +1174,35 @@ public class AiravataJPARegistry extends
 	public void updateWorkflowNodeStatus(
 			WorkflowInstanceNodeStatus workflowStatusNode)
 			throws RegistryException {
-		WorkflowInstance workflowInstance = workflowStatusNode.getWorkflowInstanceNode().getWorkflowInstance();
+		WorkflowExecution workflowInstance = workflowStatusNode.getWorkflowInstanceNode().getWorkflowInstance();
 		String nodeId = workflowStatusNode.getWorkflowInstanceNode().getNodeId();
-		if (!isWorkflowInstanceNodePresent(workflowInstance.getWorkflowInstanceId(), nodeId, true)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstance.getWorkflowInstanceId(), nodeId);
+		if (!isWorkflowInstanceNodePresent(workflowInstance.getWorkflowExecutionId(), nodeId, true)){
+			throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstance.getWorkflowExecutionId(), nodeId);
 		}
-		NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowInstanceId()).getNodeData(nodeId);
+		NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowExecutionId()).getNodeData(nodeId);
 		nodeData.setStatus(workflowStatusNode.getExecutionStatus().toString());
 		Timestamp t = new Timestamp(workflowStatusNode.getStatusUpdateTime().getTime());
-		if (workflowStatusNode.getExecutionStatus()==ExecutionStatus.STARTED){
+		if (workflowStatusNode.getExecutionStatus()==State.STARTED){
 			nodeData.setStartTime(t);
 		}
 		nodeData.setLastUpdateTime(t);
 		nodeData.save();
 		//Each time node status is updated the the time of update for the workflow status is going to be the same
-		WorkflowInstanceStatus currentWorkflowInstanceStatus = getWorkflowInstanceStatus(workflowInstance.getWorkflowInstanceId());
-		updateWorkflowInstanceStatus(new WorkflowInstanceStatus(workflowInstance, currentWorkflowInstanceStatus.getExecutionStatus(), t));
+		WorkflowExecutionStatus currentWorkflowInstanceStatus = getWorkflowInstanceStatus(workflowInstance.getWorkflowExecutionId());
+		updateWorkflowInstanceStatus(new WorkflowExecutionStatus(workflowInstance, currentWorkflowInstanceStatus.getExecutionStatus(), t));
 	}
 
 
 	@Override
 	public void updateWorkflowNodeStatus(String workflowInstanceId,
-			String nodeId, ExecutionStatus status) throws RegistryException {
-		updateWorkflowNodeStatus(new WorkflowInstanceNode(new WorkflowInstance(workflowInstanceId, workflowInstanceId), nodeId), status);
+			String nodeId, State status) throws RegistryException {
+		updateWorkflowNodeStatus(new WorkflowInstanceNode(new WorkflowExecution(workflowInstanceId, workflowInstanceId), nodeId), status);
 	}
 
 
 	@Override
 	public void updateWorkflowNodeStatus(WorkflowInstanceNode workflowNode,
-			ExecutionStatus status) throws RegistryException {
+			State status) throws RegistryException {
 		updateWorkflowNodeStatus(new WorkflowInstanceNodeStatus(workflowNode, status, Calendar.getInstance().getTime()));
 	}
 
@@ -1210,21 +1210,21 @@ public class AiravataJPARegistry extends
 	@Override
 	public WorkflowInstanceNodeStatus getWorkflowNodeStatus(
 			WorkflowInstanceNode workflowNode) throws RegistryException {
-		String id = workflowNode.getWorkflowInstance().getWorkflowInstanceId();
+		String id = workflowNode.getWorkflowInstance().getWorkflowExecutionId();
 		String nodeId = workflowNode.getNodeId();
 		if (!isWorkflowInstanceNodePresent(id, nodeId)){
 			throw new WorkflowInstanceNodeDoesNotExistsException(id, nodeId);
 		}
 		WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(id);
 		NodeDataResource nodeData = workflowInstance.getNodeData(nodeId);
-		return new WorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowInstance(workflowInstance.getExperimentID(), workflowInstance.getWorkflowInstanceID()), nodeData.getNodeID()), nodeData.getStatus()==null?null:ExecutionStatus.valueOf(nodeData.getStatus()),nodeData.getLastUpdateTime());
+		return new WorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowExecution(workflowInstance.getExperimentID(), workflowInstance.getWorkflowInstanceID()), nodeData.getNodeID()), nodeData.getStatus()==null?null:State.valueOf(nodeData.getStatus()),nodeData.getLastUpdateTime());
 	}
 
 
 	@Override
 	public Date getWorkflowNodeStartTime(WorkflowInstanceNode workflowNode)
 			throws RegistryException {
-		String id = workflowNode.getWorkflowInstance().getWorkflowInstanceId();
+		String id = workflowNode.getWorkflowInstance().getWorkflowExecutionId();
 		String nodeId = workflowNode.getNodeId();
 		if (!isWorkflowInstanceNodePresent(id, nodeId)){
 			throw new WorkflowInstanceNodeDoesNotExistsException(id, nodeId);
@@ -1236,12 +1236,12 @@ public class AiravataJPARegistry extends
 
 
 	@Override
-	public Date getWorkflowStartTime(WorkflowInstance workflowInstance)
+	public Date getWorkflowStartTime(WorkflowExecution workflowInstance)
 			throws RegistryException {
-		if (!isWorkflowInstanceExists(workflowInstance.getWorkflowInstanceId(),true)){
-			throw new WorkflowInstanceDoesNotExistsException(workflowInstance.getWorkflowInstanceId());
+		if (!isWorkflowInstanceExists(workflowInstance.getWorkflowExecutionId(),true)){
+			throw new WorkflowInstanceDoesNotExistsException(workflowInstance.getWorkflowExecutionId());
 		}
-		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowInstanceId());
+		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowExecutionId());
 		return wi.getStartTime();
 	}
 
@@ -1267,18 +1267,18 @@ public class AiravataJPARegistry extends
 
 
 	@Override
-	public WorkflowInstanceData getWorkflowInstanceData(
+	public WorkflowExecutionData getWorkflowInstanceData(
 			String workflowInstanceId) throws RegistryException {
 		if (!isWorkflowInstanceExists(workflowInstanceId,true)){
 			throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
 		}
 		try{
             WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
-            WorkflowInstance workflowInstance = new WorkflowInstance(resource.getExperimentID(), resource.getWorkflowInstanceID());
+            WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
             workflowInstance.setTemplateName(resource.getTemplateName());
             ExperimentData experimentData = getExperiment(workflowInstanceId);
 //            WorkflowInstanceData workflowInstanceData = experimentData.getWorkflowInstance(workflowInstanceId);
-            WorkflowInstanceData workflowInstanceData = new WorkflowInstanceDataImpl(null, workflowInstance, new WorkflowInstanceStatus(workflowInstance, resource.getStatus()==null? null:ExecutionStatus.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
+            WorkflowExecutionData workflowInstanceData = new WorkflowExecutionDataImpl(null, workflowInstance, new WorkflowExecutionStatus(workflowInstance, resource.getStatus()==null? null:State.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
             List<NodeDataResource> nodeData = resource.getNodeData();
             for (NodeDataResource nodeDataResource : nodeData) {
                 workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId, nodeDataResource.getNodeID()));
@@ -1292,13 +1292,13 @@ public class AiravataJPARegistry extends
 
 
 	@Override
-	public WorkflowInstanceNodeData getWorkflowInstanceNodeData(
+	public NodeExecutionData getWorkflowInstanceNodeData(
 			String workflowInstanceId, String nodeId) throws RegistryException {
 		if (!isWorkflowInstanceNodePresent(workflowInstanceId, nodeId)){
 			throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstanceId,nodeId);
 		}
 		NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstanceId).getNodeData(nodeId);
-		WorkflowInstanceNodeData data = new WorkflowInstanceNodeData(new WorkflowInstanceNode(new WorkflowInstance(nodeData.getWorkflowDataResource().getExperimentID(),nodeData.getWorkflowDataResource().getWorkflowInstanceID()),nodeData.getNodeID()));
+		NodeExecutionData data = new NodeExecutionData(new WorkflowInstanceNode(new WorkflowExecution(nodeData.getWorkflowDataResource().getExperimentID(),nodeData.getWorkflowDataResource().getWorkflowInstanceID()),nodeData.getNodeID()));
 		data.setInput(nodeData.getInputs());
 		data.setOutput(nodeData.getOutputs());
         data.setType(WorkflowNodeType.getType(nodeData.getNodeType()).getNodeType());
@@ -1352,10 +1352,10 @@ public class AiravataJPARegistry extends
 	public void updateWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type)
 			throws RegistryException {
 		try {
-			if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(), true)){
-				throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId());
+			if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(), true)){
+				throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId());
 			}
-			NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId()).getNodeData(node.getNodeId());
+			NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId()).getNodeData(node.getNodeId());
 			nodeData.setNodeType(type.getNodeType().toString());
 			nodeData.save();
 		} catch (RegistryException e) {

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java Fri Dec 14 16:02:57 2012
@@ -23,9 +23,9 @@ package org.apache.airavata.persistance.
 
 import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
 import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
-import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
+import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
 import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -44,7 +44,7 @@ public class ExperimentDataRetriever {
         Connection connection = null;
         ResultSet rs = null;
         Statement statement;
-        List<WorkflowInstance> experimentWorkflowInstances = new ArrayList<WorkflowInstance>();
+        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
         ExperimentData experimentData = null;
         try {
             Class.forName(Utils.getJDBCDriver()).newInstance();
@@ -103,24 +103,24 @@ public class ExperimentDataRetriever {
 
     private void fillWorkflowInstanceData (ExperimentData experimentData,
                                                            ResultSet rs,
-                                                           List<WorkflowInstance> workflowInstances) throws SQLException, ExperimentLazyLoadedException, ParseException {
-        WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)experimentData.getWorkflowInstance(rs.getString(5));
+                                                           List<WorkflowExecution> workflowInstances) throws SQLException, ExperimentLazyLoadedException, ParseException {
+        WorkflowExecutionDataImpl workflowInstanceData = (WorkflowExecutionDataImpl)experimentData.getWorkflowExecutionData(rs.getString(5));
         if (workflowInstanceData == null){
-            WorkflowInstance workflowInstance = new WorkflowInstance(experimentData.getExperimentId(), rs.getString(5));
+            WorkflowExecution workflowInstance = new WorkflowExecution(experimentData.getExperimentId(), rs.getString(5));
             workflowInstance.setTemplateName(rs.getString(6));
             workflowInstance.setExperimentId(rs.getString(1));
-            workflowInstance.setWorkflowInstanceId(rs.getString(5));
+            workflowInstance.setWorkflowExecutionId(rs.getString(5));
             workflowInstances.add(workflowInstance);
             Date lastUpdateDate = getTime(rs.getString(9));
             String wdStatus = rs.getString(7);
-            workflowInstanceData = new WorkflowInstanceDataImpl(null,
-                    workflowInstance, new WorkflowInstanceStatus(workflowInstance,
+            workflowInstanceData = new WorkflowExecutionDataImpl(null,
+                    workflowInstance, new WorkflowExecutionStatus(workflowInstance,
                     createExecutionStatus(wdStatus),lastUpdateDate), null);
             workflowInstanceData.setExperimentData((ExperimentDataImpl)experimentData);
-            experimentData.getWorkflowInstanceData().add(workflowInstanceData);
+            experimentData.getWorkflowExecutionDataList().add(workflowInstanceData);
         }
-        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowInstanceData.getWorkflowInstance(), rs.getString(10));
-        WorkflowInstanceNodeData workflowInstanceNodeData = new WorkflowInstanceNodeData(workflowInstanceNode);
+        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowInstanceData.getWorkflowExecution(), rs.getString(10));
+        NodeExecutionData workflowInstanceNodeData = new NodeExecutionData(workflowInstanceNode);
 
         String inputData = getStringValue(11, rs);
         String outputData = getStringValue(12, rs);
@@ -132,8 +132,8 @@ public class ExperimentDataRetriever {
         workflowInstanceData.getNodeDataList().add(workflowInstanceNodeData);
     }
 
-    private ExecutionStatus createExecutionStatus (String status){
-       return status == null ? ExecutionStatus.UNKNOWN : ExecutionStatus.valueOf(status);
+    private State createExecutionStatus (String status){
+       return status == null ? State.UNKNOWN : State.valueOf(status);
     }
 
     private String getStringValue (int parameterNumber,  ResultSet rs) throws SQLException {
@@ -242,7 +242,7 @@ public class ExperimentDataRetriever {
         Statement statement;
         Map<String, ExperimentData> experimentDataMap = new HashMap<String, ExperimentData>();
         List<ExperimentData> experimentDataList = new ArrayList<ExperimentData>();
-        List<WorkflowInstance> experimentWorkflowInstances = new ArrayList<WorkflowInstance>();
+        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
 
         try {
             Class.forName(Utils.getJDBCDriver()).newInstance();
@@ -311,7 +311,7 @@ public class ExperimentDataRetriever {
         Connection connection = null;
         ResultSet rs = null;
         Statement statement;
-        List<WorkflowInstance> experimentWorkflowInstances = new ArrayList<WorkflowInstance>();
+        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
         ExperimentData experimentData = null;
         try {
             Class.forName(Utils.getJDBCDriver()).newInstance();
@@ -336,10 +336,10 @@ public class ExperimentDataRetriever {
                     experimentData.setMetadata(rs.getString(4));
                     experimentData.setTopic(rs.getString(1));
 
-                    WorkflowInstance workflowInstance = new WorkflowInstance(experimentId, rs.getString(5));
+                    WorkflowExecution workflowInstance = new WorkflowExecution(experimentId, rs.getString(5));
                     workflowInstance.setTemplateName(rs.getString(6));
                     workflowInstance.setExperimentId(rs.getString(1));
-                    workflowInstance.setWorkflowInstanceId(rs.getString(5));
+                    workflowInstance.setWorkflowExecutionId(rs.getString(5));
                     experimentWorkflowInstances.add(workflowInstance);
                 }
             }
@@ -400,7 +400,7 @@ public class ExperimentDataRetriever {
         ResultSet rs = null;
         Statement statement;
         List<ExperimentData> experimentDataList = new ArrayList<ExperimentData>();
-        List<WorkflowInstance> experimentWorkflowInstances = new ArrayList<WorkflowInstance>();
+        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
         ExperimentData experimentData = null;
         try {
             Class.forName(Utils.getJDBCDriver()).newInstance();
@@ -426,10 +426,10 @@ public class ExperimentDataRetriever {
                     experimentData.setMetadata(rs.getString(4));
                     experimentData.setTopic(rs.getString(1));
 
-                    WorkflowInstance workflowInstance = new WorkflowInstance(rs.getString(1), rs.getString(5));
+                    WorkflowExecution workflowInstance = new WorkflowExecution(rs.getString(1), rs.getString(5));
                     workflowInstance.setTemplateName(rs.getString(6));
                     workflowInstance.setExperimentId(rs.getString(1));
-                    workflowInstance.setWorkflowInstanceId(rs.getString(5));
+                    workflowInstance.setWorkflowExecutionId(rs.getString(5));
                     experimentWorkflowInstances.add(workflowInstance);
                     experimentDataList.add(experimentData);
                 }

Modified: airavata/trunk/modules/registry/airavata-registry-test/src/test/java/org/apache/airavata/registry/api/test/AiravataRegistryAPITest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-registry-test/src/test/java/org/apache/airavata/registry/api/test/AiravataRegistryAPITest.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-registry-test/src/test/java/org/apache/airavata/registry/api/test/AiravataRegistryAPITest.java (original)
+++ airavata/trunk/modules/registry/airavata-registry-test/src/test/java/org/apache/airavata/registry/api/test/AiravataRegistryAPITest.java Fri Dec 14 16:02:57 2012
@@ -1261,7 +1261,7 @@ public class AiravataRegistryAPITest ext
         registry.updateExperimentName("testExp", "testexperiment");
 
         registry.addWorkflowInstance("testExp", "testWorkflow3", "template1");
-        List<WorkflowInstance> workflowInstances = registry.getExperimentWorkflowInstances("testExp");
+        List<WorkflowExecution> workflowInstances = registry.getExperimentWorkflowInstances("testExp");
 
         assertTrue("workflow instances retrieved successfully", workflowInstances.size() != 0);
         registry.removeExperiment("testExp");
@@ -1303,9 +1303,9 @@ public class AiravataRegistryAPITest ext
         registry.updateExperimentName("testExp", "testexperiment");
 
         registry.addWorkflowInstance("testExp", "testWorkflow5", "template1");
-        registry.updateWorkflowInstanceStatus("testWorkflow5", WorkflowInstanceStatus.ExecutionStatus.STARTED);
+        registry.updateWorkflowInstanceStatus("testWorkflow5", WorkflowExecutionStatus.State.STARTED);
 
-        assertTrue("workflow instance status updated successfully", registry.getWorkflowInstanceStatus("testWorkflow5").getExecutionStatus().equals(WorkflowInstanceStatus.ExecutionStatus.STARTED));
+        assertTrue("workflow instance status updated successfully", registry.getWorkflowInstanceStatus("testWorkflow5").getExecutionStatus().equals(WorkflowExecutionStatus.State.STARTED));
         registry.removeExperiment("testExp");
         registry.deleteWorkspaceProject("testProject");
     }
@@ -1329,8 +1329,8 @@ public class AiravataRegistryAPITest ext
         java.util.Date date = c.getTime();
         Date currentTime = new Date(date.getTime());
 
-        registry.updateWorkflowInstanceStatus(new WorkflowInstanceStatus(new WorkflowInstance("testExp", "testWorkflow6"), WorkflowInstanceStatus.ExecutionStatus.STARTED,currentTime));
-        assertTrue("workflow instance status updated successfully", registry.getWorkflowInstanceStatus("testWorkflow6").getExecutionStatus().equals(WorkflowInstanceStatus.ExecutionStatus.STARTED));
+        registry.updateWorkflowInstanceStatus(new WorkflowExecutionStatus(new WorkflowExecution("testExp", "testWorkflow6"), WorkflowExecutionStatus.State.STARTED,currentTime));
+        assertTrue("workflow instance status updated successfully", registry.getWorkflowInstanceStatus("testWorkflow6").getExecutionStatus().equals(WorkflowExecutionStatus.State.STARTED));
         registry.removeExperiment("testExp");
         registry.deleteWorkspaceProject("testProject1");
 
@@ -1351,12 +1351,12 @@ public class AiravataRegistryAPITest ext
 
         registry.addWorkflowInstance("testExp", "testWorkflow7", "template1");
 
-        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowInstance("testExp", "testWorkflow7"), "testNode");
+        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowExecution("testExp", "testWorkflow7"), "testNode");
         WorkflowNodeType nodeType = new WorkflowNodeType(WorkflowNodeType.WorkflowNode.INPUTNODE);
         registry.updateWorkflowNodeType(workflowInstanceNode, nodeType);
         registry.updateWorkflowNodeInput(workflowInstanceNode, "testData");
 
-        WorkflowInstanceNodeData nodeData = registry.getWorkflowInstanceNodeData("testWorkflow7", "testNode");
+        NodeExecutionData nodeData = registry.getWorkflowInstanceNodeData("testWorkflow7", "testNode");
         assertTrue("workflow instance node input saved successfully", nodeData.getInput().equals("testData"));
 
         registry.removeExperiment("testExp");
@@ -1380,10 +1380,10 @@ public class AiravataRegistryAPITest ext
 
         registry.addWorkflowInstance("testExp", "testWorkflow8", "template1");
 
-        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowInstance("testExp", "testWorkflow8"), "testNode");
+        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowExecution("testExp", "testWorkflow8"), "testNode");
         registry.updateWorkflowNodeOutput(workflowInstanceNode, "testData");
 
-        WorkflowInstanceNodeData nodeData = registry.getWorkflowInstanceNodeData("testWorkflow8", "testNode");
+        NodeExecutionData nodeData = registry.getWorkflowInstanceNodeData("testWorkflow8", "testNode");
         assertTrue("workflow instance node output saved successfully", nodeData.getOutput().equals("testData"));
 
         registry.removeExperiment("testExp");

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java Fri Dec 14 16:02:57 2012
@@ -26,8 +26,8 @@ import java.util.List;
 
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionData;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 
 public interface ProvenanceRegistry extends AiravataSubRegistry{
 
@@ -117,7 +117,7 @@ public interface ProvenanceRegistry exte
      */
     public abstract void setWorkflowInstanceTemplateName(String workflowInstanceId, String templateName) throws RegistryException;
     
-    public List<WorkflowInstance> getExperimentWorkflowInstances(String experimentId) throws RegistryException;
+    public List<WorkflowExecution> getExperimentWorkflowInstances(String experimentId) throws RegistryException;
 	
     /*-------------------------------------- Experiment Workflow instance node data ----------------------------------------*/
 
@@ -132,7 +132,7 @@ public interface ProvenanceRegistry exte
      * @return
      * @throws RegistryException
      */
-	public abstract void updateWorkflowInstanceStatus(String instanceId,ExecutionStatus status)throws RegistryException;
+	public abstract void updateWorkflowInstanceStatus(String instanceId,State status)throws RegistryException;
 
     /**
      * Save a status for this workflow execution
@@ -140,7 +140,7 @@ public interface ProvenanceRegistry exte
      * @return
      * @throws RegistryException
      */
-	public abstract void updateWorkflowInstanceStatus(WorkflowInstanceStatus status)throws RegistryException;
+	public abstract void updateWorkflowInstanceStatus(WorkflowExecutionStatus status)throws RegistryException;
 
 	
     /**
@@ -149,7 +149,7 @@ public interface ProvenanceRegistry exte
      * @return
      * @throws RegistryException
      */
-	public abstract WorkflowInstanceStatus getWorkflowInstanceStatus(String instanceId)throws RegistryException;
+	public abstract WorkflowExecutionStatus getWorkflowInstanceStatus(String instanceId)throws RegistryException;
 
     /**
 	 * Save the input data of a node in the workflow instance of an experiment
@@ -296,15 +296,15 @@ public interface ProvenanceRegistry exte
      */
     public abstract void updateWorkflowNodeStatus(WorkflowInstanceNodeStatus workflowStatusNode)throws RegistryException;
 
-    public abstract void updateWorkflowNodeStatus(String workflowInstanceId, String nodeId, ExecutionStatus status)throws RegistryException;
+    public abstract void updateWorkflowNodeStatus(String workflowInstanceId, String nodeId, State status)throws RegistryException;
     
-    public abstract void updateWorkflowNodeStatus(WorkflowInstanceNode workflowNode, ExecutionStatus status)throws RegistryException;
+    public abstract void updateWorkflowNodeStatus(WorkflowInstanceNode workflowNode, State status)throws RegistryException;
 
     public WorkflowInstanceNodeStatus getWorkflowNodeStatus(WorkflowInstanceNode workflowNode)throws RegistryException;
     
     public Date getWorkflowNodeStartTime(WorkflowInstanceNode workflowNode)throws RegistryException;
     
-    public Date getWorkflowStartTime(WorkflowInstance workflowInstance)throws RegistryException;
+    public Date getWorkflowStartTime(WorkflowExecution workflowInstance)throws RegistryException;
     
     /**
      * This will store the gram specific data in to repository, this can be called before submitting the workflow in to Grid
@@ -313,13 +313,13 @@ public interface ProvenanceRegistry exte
      */
     public abstract void updateWorkflowNodeGramData(WorkflowNodeGramData workflowNodeGramData)throws RegistryException;
     
-    public WorkflowInstanceData getWorkflowInstanceData(String workflowInstanceId)throws RegistryException;
+    public WorkflowExecutionData getWorkflowInstanceData(String workflowInstanceId)throws RegistryException;
     
     public boolean isWorkflowInstanceNodePresent(String workflowInstanceId, String nodeId)throws RegistryException;
     
     public boolean isWorkflowInstanceNodePresent(String workflowInstanceId, String nodeId, boolean createIfNotPresent)throws RegistryException;
     
-    public WorkflowInstanceNodeData getWorkflowInstanceNodeData(String workflowInstanceId, String nodeId)throws RegistryException;
+    public NodeExecutionData getWorkflowInstanceNodeData(String workflowInstanceId, String nodeId)throws RegistryException;
 
     public void addWorkflowInstance(String experimentId, String workflowInstanceId, String templateName) throws RegistryException;
     

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java Fri Dec 14 16:02:57 2012
@@ -31,25 +31,26 @@ import javax.xml.bind.annotation.XmlRoot
 
 import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
 import org.apache.airavata.registry.api.workflow.ExperimentData;
+import org.apache.airavata.registry.api.workflow.InputData;
+import org.apache.airavata.registry.api.workflow.OutputData;
 import org.apache.airavata.registry.api.workflow.WorkflowIOData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstance;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodeData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodePortData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecution;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionData;
+import org.apache.airavata.registry.api.workflow.NodeExecutionData;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus;
 import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
 import org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode;
 
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlRootElement
 public class ExperimentDataImpl implements ExperimentData{
-	private WorkflowInstanceStatus executionStatus;
+	private WorkflowExecutionStatus executionStatus;
 	private String user;
 	private List<WorkflowIOData> output;
 	private String experimentId;
 	private String metadata;
 	private String workflowInstanceName;
-	private List<WorkflowInstanceDataImpl> workflowInstanceDataList=new ArrayList<WorkflowInstanceDataImpl>();
+	private List<WorkflowExecutionDataImpl> workflowInstanceDataList=new ArrayList<WorkflowExecutionDataImpl>();
 	private boolean lazyLoaded=false;
 
     public ExperimentDataImpl() {
@@ -71,33 +72,28 @@ public class ExperimentDataImpl implemen
 	}
 
     @Override
-    public String getWorkflowInstanceId() throws ExperimentLazyLoadedException {
-           return getWorkflowInstanceData().get(0).getWorkflowInstanceId();
-    }
-
-    @Override
     public String getTemplateName() throws ExperimentLazyLoadedException {
-        return getWorkflowInstanceData().get(0).getTemplateName();
+        return getWorkflowExecutionDataList().get(0).getTemplateName();
     }
 
     @Override
-    public WorkflowInstanceStatus.ExecutionStatus getStatus() throws ExperimentLazyLoadedException {
-        return getWorkflowInstanceData().get(0).getStatus();
+    public WorkflowExecutionStatus.State getState() throws ExperimentLazyLoadedException {
+        return getWorkflowExecutionDataList().get(0).getState();
     }
 
     @Override
     public Date getStatusUpdateTime() throws ExperimentLazyLoadedException {
-        return getWorkflowInstanceData().get(0).getStatusUpdateTime();
+        return getWorkflowExecutionDataList().get(0).getStatusUpdateTime();
     }
 
     @Override
     public ExperimentDataImpl getExperimentData() throws ExperimentLazyLoadedException {
-        return getWorkflowInstanceData().get(0).getExperimentData();
+        return getWorkflowExecutionDataList().get(0).getExperimentData();
     }
 
     @Override
     public void setExperimentData(ExperimentDataImpl experimentData) throws ExperimentLazyLoadedException {
-        getWorkflowInstanceData().get(0).setExperimentData(experimentData);
+        getWorkflowExecutionDataList().get(0).setExperimentData(experimentData);
     }
 
     public void setExperimentId(String experimentId) {
@@ -109,10 +105,10 @@ public class ExperimentDataImpl implemen
 	public void setTopic(String topic) {
 		this.experimentId = topic;
 	}
-	public WorkflowInstanceStatus getExecutionStatus() {
+	public WorkflowExecutionStatus getExecutionStatus() {
 		return executionStatus;
 	}
-	public void setExecutionStatus(WorkflowInstanceStatus executionStatus) {
+	public void setExecutionStatus(WorkflowExecutionStatus executionStatus) {
 		this.executionStatus = executionStatus;
 	}
 	public String getUser() {
@@ -159,9 +155,9 @@ public class ExperimentDataImpl implemen
 	}
 
     @Override
-    public WorkflowInstanceData getWorkflowInstance(String workflowInstanceID) throws ExperimentLazyLoadedException {
-        for(WorkflowInstanceData workflowInstanceData : getWorkflowInstanceData()){
-            if(workflowInstanceData.getWorkflowInstanceId().equals(workflowInstanceID)){
+    public WorkflowExecutionData getWorkflowExecutionData(String workflowInstanceID) throws ExperimentLazyLoadedException {
+        for(WorkflowExecutionData workflowInstanceData : getWorkflowExecutionDataList()){
+            if(workflowInstanceData.getId().equals(workflowInstanceID)){
                 return workflowInstanceData;
             }
         }
@@ -169,7 +165,7 @@ public class ExperimentDataImpl implemen
     }
 
     @Override
-	public List<WorkflowInstanceDataImpl> getWorkflowInstanceData() throws ExperimentLazyLoadedException{
+	public List<WorkflowExecutionDataImpl> getWorkflowExecutionDataList() throws ExperimentLazyLoadedException{
 		if (isLazyLoaded()){
 			throw new ExperimentLazyLoadedException(getExperimentId());
 		}
@@ -185,23 +181,23 @@ public class ExperimentDataImpl implemen
 	}
 
     @Override
-    public WorkflowInstance getWorkflowInstance() throws ExperimentLazyLoadedException{
-        return getWorkflowInstanceData().get(0).getWorkflowInstance();
+    public WorkflowExecution getWorkflowExecution() throws ExperimentLazyLoadedException{
+        return getWorkflowExecutionDataList().get(0).getWorkflowExecution();
     }
 
     @Override
-    public List<WorkflowInstanceNodeData> getNodeDataList() throws ExperimentLazyLoadedException{
-        return getWorkflowInstanceData().get(0).getNodeDataList();
+    public List<NodeExecutionData> getNodeDataList() throws ExperimentLazyLoadedException{
+        return getWorkflowExecutionDataList().get(0).getNodeDataList();
     }
 
     @Override
-    public void addNodeData(WorkflowInstanceNodeData... nodeData) throws ExperimentLazyLoadedException {
-    	getWorkflowInstanceData().get(0).addNodeData(nodeData);
+    public void addNodeData(NodeExecutionData... nodeData) throws ExperimentLazyLoadedException {
+    	getWorkflowExecutionDataList().get(0).addNodeData(nodeData);
     }
 
     @Override
-    public WorkflowInstanceNodeData getNodeData(String nodeId) throws ExperimentLazyLoadedException {
-        return getWorkflowInstanceData().get(0).getNodeData(nodeId);
+    public NodeExecutionData getNodeData(String nodeId) throws ExperimentLazyLoadedException {
+        return getWorkflowExecutionDataList().get(0).getNodeData(nodeId);
     }
 
 	@Override
@@ -210,18 +206,18 @@ public class ExperimentDataImpl implemen
 	}
 
 	@Override
-	public List<WorkflowInstanceNodeData> getNodeDataList(WorkflowNode type)
+	public List<NodeExecutionData> getNodeDataList(WorkflowNode type)
 			throws ExperimentLazyLoadedException {
-		return getWorkflowInstanceData().get(0).getNodeDataList(type);
+		return getWorkflowExecutionDataList().get(0).getNodeDataList(type);
 	}
 
 	@Override
-	public List<WorkflowInstanceNodePortData> getWorkflowInput() throws ExperimentLazyLoadedException{
-		return getWorkflowInstanceData().get(0).getWorkflowInput();
+	public List<InputData> getWorkflowInputs() throws ExperimentLazyLoadedException{
+		return getWorkflowExecutionDataList().get(0).getWorkflowInputs();
 	}
 
 	@Override
-	public List<WorkflowInstanceNodePortData> getWorkflowOutput()throws ExperimentLazyLoadedException {
-		return getWorkflowInstanceData().get(0).getWorkflowOutput();
+	public List<OutputData> getWorkflowOutputs()throws ExperimentLazyLoadedException {
+		return getWorkflowExecutionDataList().get(0).getWorkflowOutputs();
 	}
 }

Copied: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java (from r1421909, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java?p2=airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java&p1=airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java&r1=1421909&r2=1421951&rev=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java Fri Dec 14 16:02:57 2012
@@ -28,7 +28,7 @@ import java.util.List;
 
 import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
 import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 import org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode;
 
 import javax.xml.bind.annotation.XmlAccessType;
@@ -38,82 +38,85 @@ import javax.xml.bind.annotation.XmlTran
 
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlRootElement
-public class WorkflowInstanceDataImpl implements WorkflowInstanceData {
-	private WorkflowInstance workflowInstance;
+public class WorkflowExecutionDataImpl implements WorkflowExecutionData {
+	private WorkflowExecution workflowInstance;
 
-    @XmlTransient
+	@XmlTransient
 	private ExperimentDataImpl experimentData;
-	private WorkflowInstanceStatus workflowInstanceStatus;
-	
-	private List<WorkflowInstanceNodeData> nodeDataList;
-
-    public WorkflowInstanceDataImpl() {
-    }
-
-    public WorkflowInstanceDataImpl(ExperimentData experimentData, WorkflowInstance workflowInstance, WorkflowInstanceStatus workflowInstanceStatus, List<WorkflowInstanceNodeData> nodeDataList) {
-		this.experimentData= (ExperimentDataImpl)experimentData;
-		this.workflowInstance=workflowInstance;
-		this.workflowInstanceStatus=workflowInstanceStatus;
-		this.nodeDataList=nodeDataList;
-	}
-
-    public WorkflowInstance getWorkflowInstance() {
-        return workflowInstance;
-    }
-
-    public List<WorkflowInstanceNodeData> getNodeDataList() {
-		if (nodeDataList==null){
-			nodeDataList=new ArrayList<WorkflowInstanceNodeData>();
+	private WorkflowExecutionStatus workflowInstanceStatus;
+
+	private List<NodeExecutionData> nodeDataList;
+
+	public WorkflowExecutionDataImpl() {
+	}
+
+	public WorkflowExecutionDataImpl(ExperimentData experimentData,
+			WorkflowExecution workflowInstance,
+			WorkflowExecutionStatus workflowInstanceStatus,
+			List<NodeExecutionData> nodeDataList) {
+		this.experimentData = (ExperimentDataImpl) experimentData;
+		this.workflowInstance = workflowInstance;
+		this.workflowInstanceStatus = workflowInstanceStatus;
+		this.nodeDataList = nodeDataList;
+	}
+
+	public WorkflowExecution getWorkflowExecution() {
+		return workflowInstance;
+	}
+
+	public List<NodeExecutionData> getNodeDataList() {
+		if (nodeDataList == null) {
+			nodeDataList = new ArrayList<NodeExecutionData>();
 		}
 		return nodeDataList;
 	}
-	
-	public void addNodeData(WorkflowInstanceNodeData...nodeData){
+
+	public void addNodeData(NodeExecutionData... nodeData) {
 		getNodeDataList().addAll(Arrays.asList(nodeData));
 	}
-	
-	public String getExperimentId(){
+
+	public String getExperimentId() {
 		return workflowInstance.getExperimentId();
 	}
 
-    /**
-     * @deprecated Use "getWorkflowInstanceID() instead
-     * @return
-     */
-	public String getTopicId(){
-		return workflowInstance.getWorkflowInstanceId();
+	/**
+	 * @deprecated Use "getWorkflowInstanceID() instead
+	 * @return
+	 */
+	public String getTopicId() {
+		return workflowInstance.getWorkflowExecutionId();
 	}
 
 	/**
 	 * @deprecated Use getId() instead
 	 */
-    public String getWorkflowInstanceId(){
-        return workflowInstance.getWorkflowInstanceId();
-    }
-	
+	public String getWorkflowInstanceId() {
+		return workflowInstance.getWorkflowExecutionId();
+	}
+
 	/**
 	 * @deprecated Use "WorkflowInstanceData.getTemplateName()" instead
 	 * @return
 	 */
-	public String getWorkflowName(){
+	public String getWorkflowName() {
 		return getTemplateName();
 	}
-	
-	public String getTemplateName(){
+
+	public String getTemplateName() {
 		return workflowInstance.getTemplateName();
 	}
-	
-	public ExecutionStatus getStatus(){
+
+	public State getState() {
 		return workflowInstanceStatus.getExecutionStatus();
 	}
-	
-	public Date getStatusUpdateTime(){
+
+	public Date getStatusUpdateTime() {
 		return workflowInstanceStatus.getStatusUpdateTime();
 	}
 
-	public WorkflowInstanceNodeData getNodeData(String nodeId){
-		for (WorkflowInstanceNodeData nodeData : getNodeDataList()) {
-			if (nodeData.getWorkflowInstanceNode().getNodeId().equals(nodeId)){
+	public NodeExecutionData getNodeData(String nodeId) {
+		for (NodeExecutionData nodeData : getNodeDataList()) {
+			if (nodeData.getWorkflowInstanceNode().getNodeId().equals(nodeId)) {
 				return nodeData;
 			}
 		}
@@ -127,38 +130,55 @@ public class WorkflowInstanceDataImpl im
 	public void setExperimentData(ExperimentDataImpl experimentData) {
 		this.experimentData = experimentData;
 	}
-    public String getId(){
-        return workflowInstance.getWorkflowInstanceId();
-    }
-
-    @Override
-    public List<WorkflowInstanceNodePortData> getWorkflowInput() {
-        List<WorkflowInstanceNodePortData> workflowInstanceNodePortDatas = new ArrayList<WorkflowInstanceNodePortData>();
-        for (WorkflowInstanceNodeData workflowInstanceNodeData : getNodeDataList(WorkflowNodeType.WorkflowNode.INPUTNODE)){
-             workflowInstanceNodePortDatas.addAll(workflowInstanceNodeData.getOutputData());
-        }
-        return workflowInstanceNodePortDatas;
-    }
-
-    @Override
-    public List<WorkflowInstanceNodeData> getNodeDataList(WorkflowNode type) {
-        List<WorkflowInstanceNodeData> workflowInstanceNodePortDatas = new ArrayList<WorkflowInstanceNodeData>();
-    	for (WorkflowInstanceNodeData workflowInstanceNodeData : getNodeDataList()){
-            if(workflowInstanceNodeData.getType().equals(type)){
-                 workflowInstanceNodePortDatas.add(workflowInstanceNodeData);
-            }
-        }
-        return workflowInstanceNodePortDatas;
-    }
-    
-    @Override
-    public List<WorkflowInstanceNodePortData> getWorkflowOutput() {
-        List<WorkflowInstanceNodePortData> workflowInstanceNodePortDatas = new ArrayList<WorkflowInstanceNodePortData>();
-        for (WorkflowInstanceNodeData workflowInstanceNodeData : getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE)){
-             workflowInstanceNodePortDatas.addAll(workflowInstanceNodeData.getInputData());
-        }
-        return workflowInstanceNodePortDatas;
 
-    }
+	public String getId() {
+		return workflowInstance.getWorkflowExecutionId();
+	}
+
+	@Override
+	public List<InputData> getWorkflowInputs() {
+		List<InputData> workflowInstanceNodePortDatas = new ArrayList<InputData>();
+		for (NodeExecutionData workflowInstanceNodeData : getNodeDataList(WorkflowNodeType.WorkflowNode.INPUTNODE)) {
+			workflowInstanceNodePortDatas.addAll(convertToInputDataList(workflowInstanceNodeData.getOutputData()));
+		}
+		return workflowInstanceNodePortDatas;
+	}
+
+	private List<InputData> convertToInputDataList(List<OutputData> outputData) {
+		List<InputData> i = new ArrayList<InputData>();
+		for (OutputData o : outputData) {
+			i.add(new InputData(o.getWorkflowInstanceNode(),o.getName(),o.getValue()));
+		}
+		return i;
+	}
+	private List<OutputData> convertToOutputDataList(List<InputData> outputData) {
+		List<OutputData> i = new ArrayList<OutputData>();
+		for (InputData o : outputData) {
+			i.add(new OutputData(o.getWorkflowInstanceNode(),o.getName(),o.getValue()));
+		}
+		return i;
+	}
+
+	@Override
+	public List<NodeExecutionData> getNodeDataList(WorkflowNode type) {
+		List<NodeExecutionData> workflowInstanceNodePortDatas = new ArrayList<NodeExecutionData>();
+		for (NodeExecutionData workflowInstanceNodeData : getNodeDataList()) {
+			if (workflowInstanceNodeData.getType().equals(type)) {
+				workflowInstanceNodePortDatas.add(workflowInstanceNodeData);
+			}
+		}
+		return workflowInstanceNodePortDatas;
+	}
+
+	@Override
+	public List<OutputData> getWorkflowOutputs() {
+		List<OutputData> workflowInstanceNodePortDatas = new ArrayList<OutputData>();
+		for (NodeExecutionData workflowInstanceNodeData : getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE)) {
+			workflowInstanceNodePortDatas.addAll(convertToOutputDataList(workflowInstanceNodeData
+					.getInputData()));
+		}
+		return workflowInstanceNodePortDatas;
+
+	}
 
 }

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java?rev=1421951&r1=1421950&r2=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java Fri Dec 14 16:02:57 2012
@@ -24,7 +24,7 @@ package org.apache.airavata.registry.api
 import java.util.List;
 
 import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
-import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
+import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -32,7 +32,7 @@ import javax.xml.bind.annotation.XmlRoot
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.FIELD)
-public interface ExperimentData extends WorkflowInstanceData {
+public interface ExperimentData extends WorkflowExecutionData {
     //Current Id and Topic values are similar
 
     /**
@@ -70,15 +70,15 @@ public interface ExperimentData extends 
      * @return
      * @throws ExperimentLazyLoadedException
      */
-	public List<WorkflowInstanceDataImpl> getWorkflowInstanceData() throws ExperimentLazyLoadedException;
+	public List<WorkflowExecutionDataImpl> getWorkflowExecutionDataList() throws ExperimentLazyLoadedException;
 
     /**
      * Reut
-     * @param workflowInstanceID
+     * @param workflowExecutionID
      * @return
      * @throws ExperimentLazyLoadedException
      */
-    public WorkflowInstanceData getWorkflowInstance(String workflowInstanceID) throws ExperimentLazyLoadedException;
+    public WorkflowExecutionData getWorkflowExecutionData(String workflowExecutionID) throws ExperimentLazyLoadedException;
 
     /**
      *

Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java?rev=1421951&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java Fri Dec 14 16:02:57 2012
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api.workflow;
+
+public class InputData extends WorkflowInstanceNodePortData {
+	public InputData() {
+		super();
+	}
+    public InputData(WorkflowInstanceNode workflowInstanceNode, String portName, String portValue) {
+		super(workflowInstanceNode, portName, portValue);
+	}
+	public InputData(WorkflowInstanceNode workflowInstanceNode, String data) {
+		super(workflowInstanceNode, data);
+	}
+}

Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java (from r1421909, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodeData.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java?p2=airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java&p1=airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodeData.java&r1=1421909&r2=1421951&rev=1421951&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodeData.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java Fri Dec 14 16:02:57 2012
@@ -30,19 +30,19 @@ import java.util.List;
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.FIELD)
-public class WorkflowInstanceNodeData{
+public class NodeExecutionData{
 	private WorkflowInstanceNode workflowInstanceNode;
-	private List<WorkflowInstanceNodePortData> inputData;
-	private List<WorkflowInstanceNodePortData> outputData;
+	private List<InputData> inputData;
+	private List<OutputData> outputData;
 	private String input;
 	private String output;
     private WorkflowInstanceNodeStatus status;
     private WorkflowNodeType.WorkflowNode type;
 
-    public WorkflowInstanceNodeData() {
+    public NodeExecutionData() {
     }
 
-    public WorkflowInstanceNodeData(WorkflowInstanceNode workflowInstanceNode) {
+    public NodeExecutionData(WorkflowInstanceNode workflowInstanceNode) {
 		setWorkflowInstanceNode(workflowInstanceNode);
 	}
 
@@ -62,7 +62,7 @@ public class WorkflowInstanceNodeData{
         this.status = status;
     }
 
-    public void setStatus(WorkflowInstanceStatus.ExecutionStatus status, Date date) {
+    public void setStatus(WorkflowExecutionStatus.State status, Date date) {
         setStatus(new WorkflowInstanceNodeStatus(this.workflowInstanceNode, status, date));
 
     }
@@ -96,33 +96,33 @@ public class WorkflowInstanceNodeData{
 		return parameters;
 	}
 	
-	public List<WorkflowInstanceNodePortData> getInputData() {
+	public List<InputData> getInputData() {
 		if (inputData==null){
-			inputData=new ArrayList<WorkflowInstanceNodePortData>();
+			inputData=new ArrayList<InputData>();
 			List<NameValue> data = getIOParameterData(getInput());
 			for (NameValue nameValue : data) {
-				inputData.add(new WorkflowInstanceNodePortData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
+				inputData.add(new InputData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
 			}
 		}
 		return inputData;
 	}
 
-	public void setInputData(List<WorkflowInstanceNodePortData> inputData) {
+	public void setInputData(List<InputData> inputData) {
 		this.inputData = inputData;
 	}
 
-	public List<WorkflowInstanceNodePortData> getOutputData() {
+	public List<OutputData> getOutputData() {
 		if (outputData==null){
-			outputData=new ArrayList<WorkflowInstanceNodePortData>();
+			outputData=new ArrayList<OutputData>();
 			List<NameValue> data = getIOParameterData(getOutput());
 			for (NameValue nameValue : data) {
-				outputData.add(new WorkflowInstanceNodePortData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
+				outputData.add(new OutputData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
 			}
 		}
 		return outputData;
 	}
 
-	public void setOutputData(List<WorkflowInstanceNodePortData> outputData) {
+	public void setOutputData(List<OutputData> outputData) {
 		this.outputData = outputData;
 	}
 
@@ -164,6 +164,6 @@ public class WorkflowInstanceNodeData{
     }
     
     public String getWorkflowInstanceId(){
-    	return getWorkflowInstanceNode().getWorkflowInstance().getWorkflowInstanceId();
+    	return getWorkflowInstanceNode().getWorkflowInstance().getWorkflowExecutionId();
     }
 }



Mime
View raw message