airavata-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1389651&view=rev
Log:
chking status is null b4 setting it

Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java

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=1389651&r1=1389650&r2=1389651&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 23:21:49 2012
@@ -1018,7 +1018,7 @@ public class AiravataJPARegistry extends
 			throw new WorkflowInstanceDoesNotExistsException(instanceId);
 		}
 		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
-		return new WorkflowInstanceStatus(new WorkflowInstance(wi.getExperimentID(),wi.getWorkflowInstanceID()),ExecutionStatus.valueOf(wi.getStatus()),wi.getLastUpdatedTime());
+		return new WorkflowInstanceStatus(new WorkflowInstance(wi.getExperimentID(),wi.getWorkflowInstanceID()),wi.getStatus()==null?null:ExecutionStatus.valueOf(wi.getStatus()),wi.getLastUpdatedTime());
 	}
 
 
@@ -1227,7 +1227,7 @@ public class AiravataJPARegistry extends
 		}
 		WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(id);
 		NodeDataResource nodeData = workflowInstance.getNodeData(nodeId);
-		return new WorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowInstance(workflowInstance.getExperimentID(),
workflowInstance.getWorkflowInstanceID()), nodeData.getNodeID()), ExecutionStatus.valueOf(nodeData.getStatus()),nodeData.getLastUpdateTime());
+		return new WorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowInstance(workflowInstance.getExperimentID(),
workflowInstance.getWorkflowInstanceID()), nodeData.getNodeID()), nodeData.getStatus()==null?null:ExecutionStatus.valueOf(nodeData.getStatus()),nodeData.getLastUpdateTime());
 	}
 
 
@@ -1285,7 +1285,7 @@ public class AiravataJPARegistry extends
 		}
 		WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
 		WorkflowInstance workflowInstance = new WorkflowInstance(resource.getExperimentID(), resource.getWorkflowInstanceID());
-		WorkflowInstanceData workflowInstanceData = new WorkflowInstanceData(null, workflowInstance,
new WorkflowInstanceStatus(workflowInstance, ExecutionStatus.valueOf(resource.getStatus()),resource.getLastUpdatedTime()),
null);
+		WorkflowInstanceData workflowInstanceData = new WorkflowInstanceData(null, workflowInstance,
new WorkflowInstanceStatus(workflowInstance, resource.getStatus()==null? null:ExecutionStatus.valueOf(resource.getStatus()),resource.getLastUpdatedTime()),
null);
 		List<NodeDataResource> nodeData = resource.getNodeData();
 		for (NodeDataResource nodeDataResource : nodeData) {
 			workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId,
nodeDataResource.getNodeID()));



Mime
View raw message