airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1381298 - /incubator/airavata/trunk/modules/commons/provenance-registry/src/main/java/org/apache/airavata/provenance/impl/jpa/AiravataJPAProvenanceRegistry.java
Date Wed, 05 Sep 2012 19:05:52 GMT
Author: lahiru
Date: Wed Sep  5 19:05:52 2012
New Revision: 1381298

URL: http://svn.apache.org/viewvc?rev=1381298&view=rev
Log:
commiting another getter method which will be used in xbaya-gui.

Modified:
    incubator/airavata/trunk/modules/commons/provenance-registry/src/main/java/org/apache/airavata/provenance/impl/jpa/AiravataJPAProvenanceRegistry.java

Modified: incubator/airavata/trunk/modules/commons/provenance-registry/src/main/java/org/apache/airavata/provenance/impl/jpa/AiravataJPAProvenanceRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/provenance-registry/src/main/java/org/apache/airavata/provenance/impl/jpa/AiravataJPAProvenanceRegistry.java?rev=1381298&r1=1381297&r2=1381298&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/provenance-registry/src/main/java/org/apache/airavata/provenance/impl/jpa/AiravataJPAProvenanceRegistry.java
(original)
+++ incubator/airavata/trunk/modules/commons/provenance-registry/src/main/java/org/apache/airavata/provenance/impl/jpa/AiravataJPAProvenanceRegistry.java
Wed Sep  5 19:05:52 2012
@@ -106,15 +106,20 @@ public class AiravataJPAProvenanceRegist
 	@Override
 	public List<WorkflowIOData> getWorkflowExecutionOutput(String arg0)
 			throws RegistryException {
-		// TODO Auto-generated method stub
 		return null;
 	}
 
 	@Override
-	public WorkflowIOData getWorkflowExecutionOutput(String arg0, String arg1)
+	public WorkflowIOData getWorkflowExecutionOutput(String instanceID, String nodeID)
 			throws RegistryException {
-
-		return null;
+        EntityManager em = factory.createEntityManager();
+		em.getTransaction().begin();
+        Query q = em.createQuery("SELECT p FROM Node_Data p WHERE p.workflow_InstanceID =
:workflow_InstanceID AND p.node_id = :node_id");
+        q.setParameter("workflow_InstanceID", instanceID);
+        q.setParameter("node_id", nodeID);
+        Node_Data singleResult = (Node_Data) q.getSingleResult();
+        WorkflowServiceIOData workflowIOData = new WorkflowServiceIOData(singleResult.getOutputs(),instanceID,instanceID,null,nodeID,null);
+        return workflowIOData;
 	}
 
 	@Override



Mime
View raw message