airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1481065 - in /airavata/trunk/modules/registry: airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ airavata-jpa-registry/...
Date Fri, 10 May 2013 15:48:28 GMT
Author: chathuri
Date: Fri May 10 15:48:27 2013
New Revision: 1481065

URL: http://svn.apache.org/r1481065
Log:
updating db script

Added:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_Error.java
      - copied, changed from r1480745, airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Node_Error.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.java
      - copied, changed from r1480745, airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeErrorResource.java
Removed:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Node_Error.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeErrorResource.java
Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataResource.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-mysql.sql
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/resources/data-derby.sql
    airavata/trunk/modules/registry/airavata-registry-test/src/test/resources/data-derby.sql

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
Fri May 10 15:48:27 2013
@@ -37,6 +37,6 @@ public enum ResourceType {
     WORKFLOW_DATA,
     NODE_DATA,
     GRAM_DATA,
-    NODE_ERROR
+    EXECUTION_ERROR
 
 }

Copied: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_Error.java
(from r1480745, airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Node_Error.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_Error.java?p2=airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_Error.java&p1=airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Node_Error.java&r1=1480745&r2=1481065&rev=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Node_Error.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_Error.java
Fri May 10 15:48:27 2013
@@ -25,7 +25,7 @@ import javax.persistence.*;
 import java.security.Timestamp;
 
 @Entity
-public class Node_Error {
+public class Execution_Error {
     @Id @GeneratedValue
     private int error_id;
     private String experiment_ID;
@@ -34,6 +34,9 @@ public class Node_Error {
     private String gfacJobID;
     private String source_type;
     private Timestamp error_date;
+    private String error_reporter;
+    private String error_location;
+    private String action_taken;
 
     @ManyToOne()
     @JoinColumn(name = "experiment_ID")
@@ -144,4 +147,32 @@ public class Node_Error {
     public void setExperiment_data(Experiment_Data experiment_data) {
         this.experiment_data = experiment_data;
     }
+
+    public String getError_reporter() {
+        return error_reporter;
+    }
+
+    public String getError_location() {
+        return error_location;
+    }
+
+    public String getAction_taken() {
+        return action_taken;
+    }
+
+    public Experiment_Data getExperiment_data() {
+        return experiment_data;
+    }
+
+    public void setError_reporter(String error_reporter) {
+        this.error_reporter = error_reporter;
+    }
+
+    public void setError_location(String error_location) {
+        this.error_location = error_location;
+    }
+
+    public void setAction_taken(String action_taken) {
+        this.action_taken = action_taken;
+    }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
Fri May 10 15:48:27 2013
@@ -42,7 +42,7 @@ public abstract class AbstractResource i
     public static final String EXPERIMENT_DATA = "Experiment_Data";
     public static final String WORKFLOW_DATA = "Workflow_Data";
     public static final String EXPERIMENT_METADATA = "Experiment_Metadata";
-    public static final String NODE_ERROR = "Node_Error";
+    public static final String NODE_ERROR = "Execution_Error";
 
     //Gateway Table
     public final class GatewayConstants {
@@ -176,7 +176,7 @@ public abstract class AbstractResource i
         public static final String LOCAL_JOB_ID = "local_Job_ID";
     }
 
-    public final class NodeErrorConstants {
+    public final class ExecutionErrorConstants {
         public static final String ERROR_ID = "error_id";
         public static final String EXPERIMENT_ID = "experiment_ID";
         public static final String WORKFLOW_ID = "workflow_instanceID";

Copied: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.java
(from r1480745, airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeErrorResource.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.java?p2=airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.java&p1=airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeErrorResource.java&r1=1480745&r2=1481065&rev=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeErrorResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.java
Fri May 10 15:48:27 2013
@@ -4,7 +4,7 @@ import org.apache.airavata.persistance.r
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.Experiment_Data;
-import org.apache.airavata.persistance.registry.jpa.model.Node_Error;
+import org.apache.airavata.persistance.registry.jpa.model.Execution_Error;
 import org.apache.airavata.persistance.registry.jpa.model.Workflow_Data;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -13,8 +13,8 @@ import javax.persistence.EntityManager;
 import java.security.Timestamp;
 import java.util.List;
 
-public class NodeErrorResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(NodeErrorResource.class);
+public class ExecutionErrorResource extends AbstractResource {
+    private final static Logger logger = LoggerFactory.getLogger(ExecutionErrorResource.class);
     private ExperimentDataResource experimentDataResource;
     private WorkflowDataResource workflowDataResource;
     private String nodeID;
@@ -25,6 +25,9 @@ public class NodeErrorResource extends A
     private String errorDes;
     private String errorCode;
     private int errorID;
+    private String errorReporter;
+    private String errorLocation;
+    private String actionTaken;
 
     @Override
     public Resource create(ResourceType type) {
@@ -55,18 +58,18 @@ public class NodeErrorResource extends A
         EntityManager em = ResourceUtils.getEntityManager();
         em.getTransaction().begin();
 
-        Node_Error node_error = new Node_Error();
-        node_error.setNode_id(nodeID);
+        Execution_Error execution_error = new Execution_Error();
+        execution_error.setNode_id(nodeID);
         Experiment_Data experiment_data = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
-        node_error.setExperiment_data(experiment_data);
+        execution_error.setExperiment_data(experiment_data);
         Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
-        node_error.setWorkflow_Data(workflow_data);
-        node_error.setError_code(errorCode);
-        node_error.setError_date(errorTime);
-        node_error.setError_des(errorDes);
-        node_error.setError_msg(errorMsg);
-        node_error.setSource_type(sourceType);
-        node_error.setGfacJobID(gfacJobID);
+        execution_error.setWorkflow_Data(workflow_data);
+        execution_error.setError_code(errorCode);
+        execution_error.setError_date(errorTime);
+        execution_error.setError_des(errorDes);
+        execution_error.setError_msg(errorMsg);
+        execution_error.setSource_type(sourceType);
+        execution_error.setGfacJobID(gfacJobID);
 
         em.getTransaction().commit();
         em.close();
@@ -152,4 +155,28 @@ public class NodeErrorResource extends A
     public void setErrorID(int errorID) {
         this.errorID = errorID;
     }
+
+    public String getErrorReporter() {
+        return errorReporter;
+    }
+
+    public String getErrorLocation() {
+        return errorLocation;
+    }
+
+    public String getActionTaken() {
+        return actionTaken;
+    }
+
+    public void setErrorReporter(String errorReporter) {
+        this.errorReporter = errorReporter;
+    }
+
+    public void setErrorLocation(String errorLocation) {
+        this.errorLocation = errorLocation;
+    }
+
+    public void setActionTaken(String actionTaken) {
+        this.actionTaken = actionTaken;
+    }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataResource.java?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataResource.java
Fri May 10 15:48:27 2013
@@ -24,9 +24,9 @@ package org.apache.airavata.persistance.
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Execution_Error;
 import org.apache.airavata.persistance.registry.jpa.model.Experiment_Data;
 import org.apache.airavata.persistance.registry.jpa.model.Experiment_Metadata;
-import org.apache.airavata.persistance.registry.jpa.model.Node_Error;
 import org.apache.airavata.persistance.registry.jpa.model.Workflow_Data;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.slf4j.Logger;
@@ -180,16 +180,16 @@ public class ExperimentDataResource exte
                     }
                 }
                 break;
-            case NODE_ERROR:
+            case EXECUTION_ERROR:
                 generator = new QueryGenerator(NODE_ERROR);
-                generator.setParameter(NodeErrorConstants.EXPERIMENT_ID, experimentID);
+                generator.setParameter(ExecutionErrorConstants.EXPERIMENT_ID, experimentID);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        Node_Error nodeError = (Node_Error)result;
-                        NodeErrorResource nodeErrorResource = (NodeErrorResource)Utils.getResource(ResourceType.NODE_ERROR,
nodeError);
-                        resourceList.add(nodeErrorResource);
+                        Execution_Error executionError = (Execution_Error)result;
+                        ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR,
executionError);
+                        resourceList.add(executionErrorResource);
                     }
                 }
                 break;

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java
Fri May 10 15:48:27 2013
@@ -25,9 +25,9 @@ package org.apache.airavata.persistance.
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Execution_Error;
 import org.apache.airavata.persistance.registry.jpa.model.Node_Data;
 import org.apache.airavata.persistance.registry.jpa.model.Node_DataPK;
-import org.apache.airavata.persistance.registry.jpa.model.Node_Error;
 import org.apache.airavata.persistance.registry.jpa.model.Workflow_Data;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.slf4j.Logger;
@@ -138,16 +138,16 @@ public class NodeDataResource extends Ab
         QueryGenerator generator;
         List<?> results;
         switch (type){
-            case  NODE_ERROR:
+            case EXECUTION_ERROR:
                 generator = new QueryGenerator(NODE_ERROR);
-                generator.setParameter(NodeErrorConstants.NODE_ID, nodeID);
+                generator.setParameter(ExecutionErrorConstants.NODE_ID, nodeID);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        Node_Error nodeError = (Node_Error)result;
-                        NodeErrorResource nodeErrorResource = (NodeErrorResource)Utils.getResource(ResourceType.NODE_ERROR,
nodeError);
-                        resourceList.add(nodeErrorResource);
+                        Execution_Error execution_error = (Execution_Error)result;
+                        ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR,
execution_error);
+                        resourceList.add(executionErrorResource);
                     }
                 }
                 break;

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=1481065&r1=1481064&r2=1481065&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
Fri May 10 15:48:27 2013
@@ -20,10 +20,7 @@
  */
 package org.apache.airavata.persistance.registry.jpa.resources;
 
-import java.io.IOException;
 import java.net.URI;
-import java.net.URL;
-import java.util.Properties;
 
 import org.apache.airavata.persistance.registry.jpa.JPAConstants;
 import org.apache.airavata.persistance.registry.jpa.Resource;
@@ -32,7 +29,6 @@ import org.apache.airavata.persistance.r
 import org.apache.airavata.registry.api.AiravataRegistryConnectionDataProvider;
 import org.apache.airavata.registry.api.AiravataRegistryFactory;
 import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.exception.UnknownRegistryConnectionDataException;
 import org.apache.airavata.registry.api.util.RegistrySettings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -278,9 +274,9 @@ public class Utils {
                     logger.error("Object should be a Gram Data.", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a Gram Data.");
                 }
-            case NODE_ERROR:
-                if (o instanceof Node_Error){
-                    return createNodeError((Node_Error) o);
+            case EXECUTION_ERROR:
+                if (o instanceof Execution_Error){
+                    return createExecutionError((Execution_Error) o);
                 }else {
                     logger.error("Object should be a Node Error type.", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a Node Error.");
@@ -549,21 +545,24 @@ public class Utils {
         return gramDataResource;
     }
 
-    private static Resource createNodeError (Node_Error o){
-        NodeErrorResource nodeErrorResource = new NodeErrorResource();
+    private static Resource createExecutionError(Execution_Error o){
+        ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
         ExperimentDataResource experimentDataResource = (ExperimentDataResource)createExperimentData(o.getExperiment_Data());
-        nodeErrorResource.setExperimentDataResource(experimentDataResource);
+        executionErrorResource.setExperimentDataResource(experimentDataResource);
         WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
-        nodeErrorResource.setWorkflowDataResource(workflowDataResource);
-        nodeErrorResource.setNodeID(o.getNode_id());
-        nodeErrorResource.setErrorID(o.getError_id());
-        nodeErrorResource.setGfacJobID(o.getGfacJobID());
-        nodeErrorResource.setSourceType(o.getSource_type());
-        nodeErrorResource.setErrorTime(o.getError_date());
-        nodeErrorResource.setErrorMsg(o.getError_msg());
-        nodeErrorResource.setErrorDes(o.getError_des());
-        nodeErrorResource.setErrorCode(o.getError_code());
-        return nodeErrorResource;
+        executionErrorResource.setWorkflowDataResource(workflowDataResource);
+        executionErrorResource.setNodeID(o.getNode_id());
+        executionErrorResource.setErrorID(o.getError_id());
+        executionErrorResource.setGfacJobID(o.getGfacJobID());
+        executionErrorResource.setSourceType(o.getSource_type());
+        executionErrorResource.setErrorTime(o.getError_date());
+        executionErrorResource.setErrorMsg(o.getError_msg());
+        executionErrorResource.setErrorDes(o.getError_des());
+        executionErrorResource.setErrorCode(o.getError_code());
+        executionErrorResource.setErrorReporter(o.getError_reporter());
+        executionErrorResource.setErrorLocation(o.getError_location());
+        executionErrorResource.setActionTaken(o.getAction_taken());
+        return executionErrorResource;
     }
 
 //    public static byte[] getByteArray(String content){

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
Fri May 10 15:48:27 2013
@@ -39,7 +39,7 @@ public class WorkflowDataResource extend
     private final static Logger logger = LoggerFactory.getLogger(WorkflowDataResource.class);
     public static final String NODE_DATA = "Node_Data";
     public static final String GRAM_DATA = "Gram_Data";
-    public static final String NODE_ERROR = "Node_Error";
+    public static final String NODE_ERROR = "Execution_Error";
     private String experimentID;
     private String workflowInstanceID;
     private String templateName;
@@ -105,9 +105,9 @@ public class WorkflowDataResource extend
                GramDataResource gramDataResource = new GramDataResource();
                gramDataResource.setWorkflowDataResource(this);
                return gramDataResource;
-           case NODE_ERROR:
-               NodeErrorResource nodeErrorResource = new NodeErrorResource();
-               nodeErrorResource.setWorkflowDataResource(this);
+           case EXECUTION_ERROR:
+               ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
+               executionErrorResource.setWorkflowDataResource(this);
            default:
                logger.error("Unsupported resource type for workflow data resource.", new
IllegalArgumentException());
                throw new IllegalArgumentException("Unsupported resource type for workflow
data resource.");
@@ -134,9 +134,9 @@ public class WorkflowDataResource extend
                 q = generator.deleteQuery(em);
                 q.executeUpdate();
                 break;
-            case NODE_ERROR:
+            case EXECUTION_ERROR:
                 generator = new QueryGenerator(NODE_ERROR);
-                generator.setParameter(NodeErrorConstants.ERROR_ID, name);
+                generator.setParameter(ExecutionErrorConstants.ERROR_ID, name);
                 q = generator.deleteQuery(em);
                 q.executeUpdate();
                 break;
@@ -174,15 +174,15 @@ public class WorkflowDataResource extend
                 em.getTransaction().commit();
                 em.close();
                 return gramDataResource;
-            case NODE_ERROR:
+            case EXECUTION_ERROR:
                 generator = new QueryGenerator(NODE_ERROR);
-                generator.setParameter(NodeErrorConstants.ERROR_ID, name);
+                generator.setParameter(ExecutionErrorConstants.ERROR_ID, name);
                 q = generator.selectQuery(em);
-                Node_Error node_error = (Node_Error)q.getSingleResult();
-                NodeErrorResource nodeErrorResource = (NodeErrorResource)Utils.getResource(ResourceType.NODE_ERROR,
node_error);
+                Execution_Error execution_error = (Execution_Error)q.getSingleResult();
+                ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR,
execution_error);
                 em.getTransaction().commit();
                 em.close();
-                return nodeErrorResource;
+                return executionErrorResource;
             default:
                 em.getTransaction().commit();
                 em.close();
@@ -228,16 +228,16 @@ public class WorkflowDataResource extend
                     }
                 }
                 break;
-            case  NODE_ERROR:
+            case EXECUTION_ERROR:
                 generator = new QueryGenerator(NODE_ERROR);
-                generator.setParameter(NodeErrorConstants.WORKFLOW_ID, workflowInstanceID);
+                generator.setParameter(ExecutionErrorConstants.WORKFLOW_ID, workflowInstanceID);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        Node_Error nodeError = (Node_Error)result;
-                        NodeErrorResource nodeErrorResource = (NodeErrorResource)Utils.getResource(ResourceType.NODE_ERROR,
nodeError);
-                        resourceList.add(nodeErrorResource);
+                        Execution_Error executionError = (Execution_Error)result;
+                        ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR,
executionError);
+                        resourceList.add(executionErrorResource);
                     }
                 }
                 break;

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
Fri May 10 15:48:27 2013
@@ -39,7 +39,7 @@
 		<class>org.apache.airavata.persistance.registry.jpa.model.Workflow_Data</class>
 		<class>org.apache.airavata.persistance.registry.jpa.model.Node_Data</class>
 		<class>org.apache.airavata.persistance.registry.jpa.model.Gram_Data</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Node_Error</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.Execution_Error</class>
         <!--properties>
             <property name="openjpa.ConnectionURL"
                       value="jdbc:mysql://localhost:3306/persitant_data" />

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
Fri May 10 15:48:27 2013
@@ -218,7 +218,7 @@ CREATE TABLE CREDENTIALS
         PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME)
 );
 
-CREATE TABLE Node_Error
+CREATE TABLE Execution_Error
 (
        error_id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
        experiment_ID varchar(255),
@@ -230,6 +230,9 @@ CREATE TABLE Node_Error
        error_msg CLOB,
        error_des CLOB,
        error_code varchar(255),
+       error_reporter varchar(255),
+       error_location varchar(255),
+       action_taken varchar(255),
        PRIMARY KEY(error_id),
        FOREIGN KEY (workflow_instanceID) REFERENCES Workflow_Data(workflow_instanceID) ON
DELETE CASCADE,
        FOREIGN KEY (experiment_ID) REFERENCES Experiment_Data(experiment_ID) ON DELETE CASCADE

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-mysql.sql
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-mysql.sql?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-mysql.sql
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-mysql.sql
Fri May 10 15:48:27 2013
@@ -216,7 +216,7 @@ CREATE TABLE CREDENTIALS
         PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME)
 );
 
-CREATE TABLE Node_Error
+CREATE TABLE Execution_Error
 (
        error_id INT NOT NULL AUTO_INCREMENT,
        experiment_ID varchar(255),
@@ -228,6 +228,9 @@ CREATE TABLE Node_Error
        error_msg LONGTEXT,
        error_des LONGTEXT,
        error_code varchar(255),
+       error_reporter varchar(255),
+       error_location varchar(255),
+       action_taken varchar(255),
        PRIMARY KEY(error_id),
        FOREIGN KEY (workflow_instanceID) REFERENCES Workflow_Data(workflow_instanceID) ON
DELETE CASCADE,
        FOREIGN KEY (experiment_ID) REFERENCES Experiment_Data(experiment_ID) ON DELETE CASCADE

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/resources/data-derby.sql
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/resources/data-derby.sql?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/resources/data-derby.sql
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/resources/data-derby.sql
Fri May 10 15:48:27 2013
@@ -218,7 +218,7 @@ CREATE TABLE CREDENTIALS
         PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME)
 );
 
-CREATE TABLE Node_Error
+CREATE TABLE Execution_Error
 (
        error_id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
        experiment_ID varchar(255),
@@ -230,6 +230,9 @@ CREATE TABLE Node_Error
        error_msg CLOB,
        error_des CLOB,
        error_code varchar(255),
+       error_reporter varchar(255),
+       error_location varchar(255),
+       action_taken varchar(255),
        PRIMARY KEY(error_id),
        FOREIGN KEY (workflow_instanceID) REFERENCES Workflow_Data(workflow_instanceID) ON
DELETE CASCADE,
        FOREIGN KEY (experiment_ID) REFERENCES Experiment_Data(experiment_ID) ON DELETE CASCADE

Modified: airavata/trunk/modules/registry/airavata-registry-test/src/test/resources/data-derby.sql
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-registry-test/src/test/resources/data-derby.sql?rev=1481065&r1=1481064&r2=1481065&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-registry-test/src/test/resources/data-derby.sql
(original)
+++ airavata/trunk/modules/registry/airavata-registry-test/src/test/resources/data-derby.sql
Fri May 10 15:48:27 2013
@@ -218,7 +218,7 @@ CREATE TABLE CREDENTIALS
         PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME)
 );
 
-CREATE TABLE Node_Error
+CREATE TABLE Execution_Error
 (
        error_id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
        experiment_ID varchar(255),
@@ -230,6 +230,9 @@ CREATE TABLE Node_Error
        error_msg CLOB,
        error_des CLOB,
        error_code varchar(255),
+       error_reporter varchar(255),
+       error_location varchar(255),
+       action_taken varchar(255),
        PRIMARY KEY(error_id),
        FOREIGN KEY (workflow_instanceID) REFERENCES Workflow_Data(workflow_instanceID) ON
DELETE CASCADE,
        FOREIGN KEY (experiment_ID) REFERENCES Experiment_Data(experiment_ID) ON DELETE CASCADE



Mime
View raw message