airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1377725 - /incubator/airavata/trunk/modules/commons/provenance-registry/src/main/java/org/apache/airavata/provenance/impl/jpa/AiravataJPAProvenanceRegistry.java
Date Mon, 27 Aug 2012 15:57:13 GMT
Author: lahiru
Date: Mon Aug 27 15:57:12 2012
New Revision: 1377725

URL: http://svn.apache.org/viewvc?rev=1377725&view=rev
Log:
fixing build error in provenance-registry component.

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=1377725&r1=1377724&r2=1377725&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
Mon Aug 27 15:57:12 2012
@@ -174,25 +174,6 @@ public class AiravataJPAProvenanceRegist
 	public boolean saveWorkflowExecutionMetadata(String arg0, String arg1)
 			throws RegistryException {
 		// TODO Auto-generated method stub
-		EntityManager em = factory.createEntityManager();
-		em.getTransaction().begin();
-		Query q = em.createQuery("SELECT p FROM Experiment_Data p WHERE p.experiment_ID = :exp_ID");
-		q.setParameter("exp_ID", arg0.getExperimentID());
-		Experiment_Data eData = (Experiment_Data) q.getSingleResult();
-		
-		Workflow_Data wData = new Workflow_Data();
-		wData.setExperiment_Data(eData);
-		wData.setExperiment_Data(eData);
-		wData.setTemplate_name(arg0.getTemplateID());
-		wData.setWorkflow_instanceID(arg0.getWorkflowInstanceID());
-		wData.setStatus(arg0.getWorkflowStatus().toString());
-		wData.setStart_time(arg0.getStartTime());
-		
-		em.persist(wData);
-		
-		em.getTransaction().commit();
-		em.close();
-		
 		return true;
 	}
 
@@ -220,25 +201,6 @@ public class AiravataJPAProvenanceRegist
 	public boolean saveWorkflowExecutionOutput(String arg0, WorkflowIOData arg1)
 			throws RegistryException {
 		// TODO Auto-generated method stub
-		EntityManager em = factory.createEntityManager();
-		em.getTransaction().begin();
-		
-		Query q = em.createQuery("select w from Workflow_Data w.workflow_instanceID = :workflow_ID");
-		q.setParameter("workflow_ID", arg0.getWorkflowInstanceId());
-		Workflow_Data wData = (Workflow_Data) q.getSingleResult();
-		
-		Node_Data nData = new Node_Data();
-		nData.setWorkflow_Data(wData);
-		nData.setNode_id(arg0.getNodeId());
-		nData.setInputs(arg0.getValue());
-		nData.setNode_type((arg0.getNodeType().toString()));
-		nData.setStatus(arg0.getNodeStatus().toString());
-		
-		em.persist(nData);
-	
-		em.getTransaction().commit();
-		em.close();
-		
 		return true;
 	}
 
@@ -265,7 +227,7 @@ public class AiravataJPAProvenanceRegist
 		nData.setNode_id(arg0.getNodeId());
 		nData.setInputs(arg0.getValue());
 		nData.setNode_type((arg0.getNodeType().toString()));
-		nData.setStatus(arg0.getNodeStatus().toString());
+		nData.setStatus(arg0.getNodeStatus().getExecutionStatus().toString());
 		
 		em.persist(nData);
 	
@@ -287,7 +249,7 @@ public class AiravataJPAProvenanceRegist
 		q.setParameter("workflow_ID", arg0);
 		Workflow_Data wData = (Workflow_Data) q.getSingleResult();
 		
-		wData.setStatus(arg1.toString());
+		wData.setStatus(arg0.getNodeStatus().getExecutionStatus().toString());
 		
 		em.getTransaction().commit();
 		em.close();
@@ -343,10 +305,7 @@ public class AiravataJPAProvenanceRegist
 		
 		q = em.createQuery("SELECT p FROM Node_Data p WHERE p.workflow_Data = :workflow_data AND
p.node_id = :node_ID");
 		q.setParameter("workflow_data", wData);
-		q.setParameter("node_ID", arg1);
-		Node_Data nData = (Node_Data) q.getSingleResult();
-		nData.setStatus(arg2.toString());
-		
+		q.setParameter("node_ID", arg0.getNodeID());
 		em.getTransaction().commit();
 		em.close();
 		



Mime
View raw message