You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2013/06/07 17:47:58 UTC

svn commit: r1490693 - in /airavata/trunk: modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java tools/registry-tool/src/main/resources/db-scripts/0.8/migrate_mysql.sql

Author: samindaw
Date: Fri Jun  7 15:47:58 2013
New Revision: 1490693

URL: http://svn.apache.org/r1490693
Log:
updating id validation locations + updating db migration scripts

Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
    airavata/trunk/tools/registry-tool/src/main/resources/db-scripts/0.8/migrate_mysql.sql

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=1490693&r1=1490692&r2=1490693&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 Jun  7 15:47:58 2013
@@ -2378,16 +2378,22 @@ public class AiravataJPARegistry extends
 	@Override
 	public List<ApplicationJob> getApplicationJobs(String experimentId,
 			String workflowExecutionId, String nodeId) throws RegistryException {
-		if (!isWorkflowInstanceNodePresent(workflowExecutionId, nodeId)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(workflowExecutionId, nodeId);
-		}
 		List<ApplicationJob> jobs=new ArrayList<ApplicationJob>();
 		List<Resource> gFacJobs;
 		if (workflowExecutionId==null){
+			if (!isExperimentExists(experimentId)){
+				throw new ExperimentDoesNotExistsException(experimentId);
+			}
 			gFacJobs = jpa.getWorker().getExperiment(experimentId).getData().getGFacJobs();
 		}else if (nodeId==null){
+			if (!isWorkflowInstanceExists(workflowExecutionId)){
+				throw new WorkflowInstanceDoesNotExistsException(workflowExecutionId);
+			}
 			gFacJobs = jpa.getWorker().getExperiment(experimentId).getData().getWorkflowInstance(workflowExecutionId).getGFacJobs();
 		}else{
+			if (!isWorkflowInstanceNodePresent(workflowExecutionId, nodeId)){
+				throw new WorkflowInstanceNodeDoesNotExistsException(workflowExecutionId, nodeId);
+			}
 			gFacJobs = jpa.getWorker().getExperiment(experimentId).getData().getWorkflowInstance(workflowExecutionId).getNodeData(nodeId).getGFacJobs();
 		}
 		for (Resource resource : gFacJobs) {

Modified: airavata/trunk/tools/registry-tool/src/main/resources/db-scripts/0.8/migrate_mysql.sql
URL: http://svn.apache.org/viewvc/airavata/trunk/tools/registry-tool/src/main/resources/db-scripts/0.8/migrate_mysql.sql?rev=1490693&r1=1490692&r2=1490693&view=diff
==============================================================================
--- airavata/trunk/tools/registry-tool/src/main/resources/db-scripts/0.8/migrate_mysql.sql (original)
+++ airavata/trunk/tools/registry-tool/src/main/resources/db-scripts/0.8/migrate_mysql.sql Fri Jun  7 15:47:58 2013
@@ -52,7 +52,7 @@ create table GFac_Job_Data
        local_Job_ID varchar(255),
        submitted_time TIMESTAMP DEFAULT '0000-00-00 00:00:00',
        status_update_time TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-       status INT,
+       status varchar(255),
        metadata LONGTEXT,
        PRIMARY KEY(local_Job_ID),
        FOREIGN KEY (experiment_ID) REFERENCES Experiment_Data(experiment_ID),