airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1389373 - in /airavata/trunk/modules: registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ registry/airav...
Date Mon, 24 Sep 2012 13:42:50 GMT
Author: samindaw
Date: Mon Sep 24 13:42:49 2012
New Revision: 1389373

URL: http://svn.apache.org/viewvc?rev=1389373&view=rev
Log:
calling save() on status update & fixing typo errors

Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.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/Utils.java
    airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/utils/ApplicationVersion.java

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java?rev=1389373&r1=1389372&r2=1389373&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
Mon Sep 24 13:42:49 2012
@@ -46,7 +46,7 @@ public class ResourceUtils {
         properties.put("openjpa.ConnectionPassword",Utils.getJDBCPassword());
         properties.put("openjpa.DynamicEnhancementAgent","true");
         properties.put("openjpa.RuntimeUnenhancedClasses","supported");
-        properties.put("openjpa.Log","SQL=TRACE");
+        properties.put("openjpa.Log","SQL=ERROR");
         properties.put("openjpa.ReadLockLevel", "none");
         properties.put("openjpa.WriteLockLevel", "none");
         properties.put("openjpa.LockTimeout", "30000");

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=1389373&r1=1389372&r2=1389373&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
Mon Sep 24 13:42:49 2012
@@ -928,6 +928,7 @@ public class AiravataJPARegistry extends
 		}
 		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
 		wi.setTemplateName(templateName);
+		wi.save();
 	}
 
 
@@ -987,6 +988,7 @@ public class AiravataJPARegistry extends
 			wi.setStartTime(currentTime);
 		}
 		wi.setLastUpdatedTime(currentTime);
+		wi.save();
 		return true;
 	}
 
@@ -1036,13 +1038,18 @@ public class AiravataJPARegistry extends
 
 	@Override
 	public boolean updateWorkflowNodeOutput(WorkflowInstanceNode node, String data) throws RegistryException
{
-		if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),true)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(),
node.getNodeId());
+		try {
+			if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),true)){
+				throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(),
node.getNodeId());
+			}
+			WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId());
+			NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
+			nodeData.setOutputs(data);
+			nodeData.save();
+		} catch (RegistryException e) {
+			e.printStackTrace();
+			throw e;
 		}
-		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId());
-		NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
-		nodeData.setOutputs(data);
-		nodeData.save();
 		return true;
 	}
 
@@ -1347,13 +1354,18 @@ public class AiravataJPARegistry extends
 	@Override
 	public boolean updateWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type)
 			throws RegistryException {
-		if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),
true)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId());
+		try {
+			if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),
true)){
+				throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId());
+			}
+			NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId()).getNodeData(node.getNodeId());
+			nodeData.setNodeType(type.getNodeType().toString());
+			nodeData.save();
+		} catch (RegistryException e) {
+			e.printStackTrace();
+			throw e;
 		}
-		NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId()).getNodeData(node.getNodeId());
-		nodeData.setNodeType(type.getNodeType().toString());
-		nodeData.save();
-		return false;
+		return true;
 	}
 
 

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java?rev=1389373&r1=1389372&r2=1389373&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
Mon Sep 24 13:42:49 2012
@@ -389,9 +389,13 @@ public class Utils {
         nodeDataResource.setWorkflowDataResource(workflowDataResource);
         nodeDataResource.setNodeID(o.getNode_id());
         nodeDataResource.setNodeType(o.getNode_type());
-        nodeDataResource.setInputs(new String(o.getInputs()));
-        nodeDataResource.setOutputs(new String(o.getOutputs()));
-        nodeDataResource.setStatus(o.getStatus());
+        if (o.getInputs()!=null) {
+			nodeDataResource.setInputs(new String(o.getInputs()));
+		}
+		if (o.getOutputs()!=null) {
+			nodeDataResource.setOutputs(new String(o.getOutputs()));
+		}
+		nodeDataResource.setStatus(o.getStatus());
         nodeDataResource.setStartTime(o.getStart_time());
         nodeDataResource.setLastUpdateTime(o.getLast_update_time());
         return nodeDataResource;

Modified: airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/utils/ApplicationVersion.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/utils/ApplicationVersion.java?rev=1389373&r1=1389372&r2=1389373&view=diff
==============================================================================
--- airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/utils/ApplicationVersion.java
(original)
+++ airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/utils/ApplicationVersion.java
Mon Sep 24 13:42:49 2012
@@ -28,7 +28,7 @@ public class ApplicationVersion {
     /**
      * Version number
      */
-    public final static Version VERSION = new Version("Airavata",0,4,null,"INCUBATING",null);//"0.3-INCUBATING";
+    public final static Version VERSION = new Version("Airavata",0,5,null,null,null);//"0.3-INCUBATING";
 
     /**
      * Prints the version



Mime
View raw message