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/05/13 22:05:02 UTC
svn commit: r1482058 - in /airavata/trunk/modules:
airavata-client/src/main/java/org/apache/airavata/client/
airavata-client/src/main/java/org/apache/airavata/client/api/
airavata-client/src/main/java/org/apache/airavata/client/impl/
gfac-core/src/main...
Author: samindaw
Date: Mon May 13 20:05:01 2013
New Revision: 1482058
URL: http://svn.apache.org/r1482058
Log:
adding error functions to the API
Added:
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java (with props)
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java (with props)
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java (with props)
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJobExecutionError.java (with props)
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java (with props)
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java (with props)
Modified:
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.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/model/Execution_Error.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/ExecutionErrorResource.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/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
airavata/trunk/modules/workflow-model/pom.xml
airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/utils/ApplicationVersion.java
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java Mon May 13 20:05:01 2013
@@ -95,7 +95,7 @@ public class AiravataClient extends Obse
private String gateway;
private boolean configCreated = false;
- private static final Version API_VERSION = new Version("Airavata", 0, 7,
+ private static final Version API_VERSION = new Version("Airavata", 0, 8,
null, null, null);
// FIXME: Need a constructor to set registry URL
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java Mon May 13 20:05:01 2013
@@ -24,6 +24,13 @@ package org.apache.airavata.client.api;
import java.util.List;
import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
+import org.apache.airavata.registry.api.ExecutionErrors;
+import org.apache.airavata.registry.api.exception.RegistryException;
+import org.apache.airavata.registry.api.workflow.ExecutionError;
+import org.apache.airavata.registry.api.workflow.ExperimentExecutionError;
+import org.apache.airavata.registry.api.workflow.GFacJobExecutionError;
+import org.apache.airavata.registry.api.workflow.NodeExecutionError;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionError;
import org.apache.airavata.workflow.model.wf.Workflow;
import org.apache.airavata.workflow.model.wf.WorkflowInput;
import org.apache.airavata.ws.monitor.Monitor;
@@ -172,4 +179,98 @@ public interface ExecutionManager {
*/
public void waitForExperimentTermination(String experimentId) throws AiravataAPIInvocationException;
+ /*
+ * Errors in experiment executions
+ */
+
+ /**
+ * Return errors defined at the experiment level
+ * @param experimentId
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public List<ExperimentExecutionError> getExperimentExecutionErrors(String experimentId) throws AiravataAPIInvocationException;
+
+ /**
+ * Return errors defined at the workflow level
+ * @param experimentId
+ * @param workflowInstanceId
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public List<WorkflowExecutionError> getWorkflowExecutionErrors(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
+
+ /**
+ * Return errors defined at the node level
+ * @param experimentId
+ * @param workflowInstanceId
+ * @param nodeId
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public List<NodeExecutionError> getNodeExecutionErrors(String experimentId, String workflowInstanceId, String nodeId) throws AiravataAPIInvocationException;
+
+ /**
+ * Return errors defined for a GFac job
+ * @param experimentId
+ * @param workflowInstanceId
+ * @param nodeId
+ * @param gfacJobId
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public List<GFacJobExecutionError> getGFacJobErrors(String experimentId, String workflowInstanceId, String nodeId, String gfacJobId) throws AiravataAPIInvocationException;
+
+ /**
+ * Return errors defined for a GFac job
+ * @param gfacJobId
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public List<GFacJobExecutionError> getGFacJobErrors(String gfacJobId) throws AiravataAPIInvocationException;
+
+ /**
+ * Return errors filtered by the parameters
+ * @param experimentId
+ * @param workflowInstanceId
+ * @param nodeId
+ * @param gfacJobId
+ * @param filterBy - what type of source types the results should contain
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public List<ExecutionError> getExecutionErrors(String experimentId, String workflowInstanceId, String nodeId, String gfacJobId, ExecutionErrors.Source...filterBy) throws AiravataAPIInvocationException;
+
+ /**
+ * Adds an experiment execution error
+ * @param error
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public int addExperimentError(ExperimentExecutionError error) throws AiravataAPIInvocationException;
+
+ /**
+ * Adds an workflow execution error
+ * @param error
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public int addWorkflowExecutionError(WorkflowExecutionError error) throws AiravataAPIInvocationException;
+
+ /**
+ * Adds an node execution error
+ * @param error
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public int addNodeExecutionError(NodeExecutionError error) throws AiravataAPIInvocationException;
+
+ /**
+ * Adds an GFac job execution error
+ * @param error
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
+ public int addGFacJobExecutionError(GFacJobExecutionError error) throws AiravataAPIInvocationException;
+
}
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java Mon May 13 20:05:01 2013
@@ -21,13 +21,32 @@
package org.apache.airavata.client.impl;
+import java.net.URISyntaxException;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+import java.util.UUID;
+
+import javax.xml.stream.XMLStreamException;
+
import org.apache.airavata.client.AiravataClient;
-import org.apache.airavata.client.api.*;
+import org.apache.airavata.client.api.AiravataAPIInvocationException;
+import org.apache.airavata.client.api.ExecutionManager;
+import org.apache.airavata.client.api.ExperimentAdvanceOptions;
+import org.apache.airavata.client.api.NodeSettings;
+import org.apache.airavata.client.api.OutputDataSettings;
import org.apache.airavata.client.stub.interpretor.NameValue;
import org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub;
import org.apache.airavata.client.tools.NameValuePairType;
import org.apache.airavata.common.utils.XMLUtil;
import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
+import org.apache.airavata.registry.api.ExecutionErrors.Source;
+import org.apache.airavata.registry.api.workflow.ExecutionError;
+import org.apache.airavata.registry.api.workflow.ExperimentExecutionError;
+import org.apache.airavata.registry.api.workflow.GFacJobExecutionError;
+import org.apache.airavata.registry.api.workflow.NodeExecutionError;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionError;
import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus;
import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
import org.apache.airavata.schemas.wec.ApplicationOutputDataHandlingDocument.ApplicationOutputDataHandling;
@@ -37,19 +56,16 @@ import org.apache.airavata.workflow.mode
import org.apache.airavata.workflow.model.graph.GraphException;
import org.apache.airavata.workflow.model.wf.Workflow;
import org.apache.airavata.workflow.model.wf.WorkflowInput;
-import org.apache.airavata.ws.monitor.*;
+import org.apache.airavata.ws.monitor.EventData;
+import org.apache.airavata.ws.monitor.EventDataListener;
+import org.apache.airavata.ws.monitor.EventDataListenerAdapter;
+import org.apache.airavata.ws.monitor.EventDataRepository;
+import org.apache.airavata.ws.monitor.Monitor;
+import org.apache.airavata.ws.monitor.MonitorConfiguration;
import org.apache.airavata.ws.monitor.MonitorUtil.EventType;
import org.apache.axiom.om.impl.llom.util.AXIOMUtil;
import org.apache.axis2.AxisFault;
-import javax.xml.stream.XMLStreamException;
-import java.net.URISyntaxException;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-import java.util.UUID;
-
public class ExecutionManagerImpl implements ExecutionManager {
private AiravataClient client;
@@ -401,4 +417,112 @@ public class ExecutionManagerImpl implem
e.printStackTrace();
}
}
+
+ @Override
+ public List<ExperimentExecutionError> getExperimentExecutionErrors(
+ String experimentId) throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().getExperimentExecutionErrors(experimentId);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public List<WorkflowExecutionError> getWorkflowExecutionErrors(
+ String experimentId, String workflowInstanceId)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().getWorkflowExecutionErrors(experimentId,
+ workflowInstanceId);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public List<NodeExecutionError> getNodeExecutionErrors(String experimentId,
+ String workflowInstanceId, String nodeId)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().getNodeExecutionErrors(experimentId,
+ workflowInstanceId, nodeId);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public List<GFacJobExecutionError> getGFacJobErrors(String experimentId,
+ String workflowInstanceId, String nodeId, String gfacJobId)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().getGFacJobErrors(experimentId,
+ workflowInstanceId, nodeId, gfacJobId);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public List<GFacJobExecutionError> getGFacJobErrors(String gfacJobId)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().getGFacJobErrors(gfacJobId);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public List<ExecutionError> getExecutionErrors(String experimentId,
+ String workflowInstanceId, String nodeId, String gfacJobId,
+ Source... filterBy) throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().getExecutionErrors(experimentId,
+ workflowInstanceId, nodeId, gfacJobId, filterBy);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public int addExperimentError(ExperimentExecutionError error)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().addExperimentError(error);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public int addWorkflowExecutionError(WorkflowExecutionError error)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().addWorkflowExecutionError(error);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public int addNodeExecutionError(NodeExecutionError error)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().addNodeExecutionError(error);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
+
+ @Override
+ public int addGFacJobExecutionError(GFacJobExecutionError error)
+ throws AiravataAPIInvocationException {
+ try {
+ return getClient().getRegistryClient().addGFacJobExecutionError(error);
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
+ }
}
Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java Mon May 13 20:05:01 2013
@@ -329,7 +329,8 @@ public class GridFtp {
} finally {
if (ftpClient != null) {
try {
- ftpClient.close();
+ //ftpClient.close();
+ ftpClient.close(false);
} catch (Exception e) {
log.warn("Cannot close GridFTP client connection",e);
}
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=1482058&r1=1482057&r2=1482058&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 May 13 20:05:01 2013
@@ -40,6 +40,7 @@ import org.apache.airavata.persistance.r
import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
import org.apache.airavata.persistance.registry.jpa.resources.ApplicationDescriptorResource;
import org.apache.airavata.persistance.registry.jpa.resources.ConfigurationResource;
+import org.apache.airavata.persistance.registry.jpa.resources.ExecutionErrorResource;
import org.apache.airavata.persistance.registry.jpa.resources.ExperimentDataResource;
import org.apache.airavata.persistance.registry.jpa.resources.ExperimentDataRetriever;
import org.apache.airavata.persistance.registry.jpa.resources.ExperimentMetadataResource;
@@ -55,6 +56,7 @@ import org.apache.airavata.persistance.r
import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
import org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource;
import org.apache.airavata.registry.api.*;
+import org.apache.airavata.registry.api.ExecutionErrors.Source;
import org.apache.airavata.registry.api.exception.*;
import org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException;
import org.apache.airavata.registry.api.exception.gateway.DescriptorDoesNotExistsException;
@@ -76,7 +78,7 @@ public class AiravataJPARegistry extends
private JPAResourceAccessor jpa;
private boolean active=false;
private static final String DEFAULT_PROJECT_NAME = "default";
- private static final Version API_VERSION=new Version("Airavata Registry API",0,7,null,null,null);
+ private static final Version API_VERSION=new Version("Airavata Registry API",0,8,null,null,null);
private URI registryConnectionURI;
private ConfigurationRegistry configurationRegistry;
private DescriptorRegistry descriptorRegistry;
@@ -1951,4 +1953,221 @@ public class AiravataJPARegistry extends
return callback;
}
+ @Override
+ public List<ExperimentExecutionError> getExperimentExecutionErrors(
+ String experimentId) throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.getExperimentExecutionErrors(experimentId);
+ }
+ List<ExperimentExecutionError> result=new ArrayList<ExperimentExecutionError>();
+ List<ExecutionErrorResource> executionErrors = jpa.getWorker().getExperiment(experimentId).getData().getExecutionErrors(Source.GFAC.toString(), experimentId, null, null, null);
+ for (ExecutionErrorResource errorResource : executionErrors) {
+ ExperimentExecutionError error = new ExperimentExecutionError();
+ setupValues(errorResource, error);
+ error.setExperimentId(errorResource.getExperimentDataResource().getExperimentID());
+ result.add(error);
+ }
+ return result;
+ }
+
+ @Override
+ public List<WorkflowExecutionError> getWorkflowExecutionErrors(
+ String experimentId, String workflowInstanceId)
+ throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.getWorkflowExecutionErrors(experimentId, workflowInstanceId);
+ }
+ List<WorkflowExecutionError> result=new ArrayList<WorkflowExecutionError>();
+ List<ExecutionErrorResource> executionErrors = jpa.getWorker().getExperiment(experimentId).getData().getExecutionErrors(Source.GFAC.toString(), experimentId, workflowInstanceId, null, null);
+ for (ExecutionErrorResource errorResource : executionErrors) {
+ WorkflowExecutionError error = new WorkflowExecutionError();
+ setupValues(errorResource, error);
+ error.setExperimentId(errorResource.getExperimentDataResource().getExperimentID());
+ error.setWorkflowInstanceId(errorResource.getWorkflowDataResource().getWorkflowInstanceID());
+ result.add(error);
+ }
+ return result;
+ }
+
+ @Override
+ public List<NodeExecutionError> getNodeExecutionErrors(String experimentId,
+ String workflowInstanceId, String nodeId) throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.getNodeExecutionErrors(experimentId, workflowInstanceId, nodeId);
+ }
+ List<NodeExecutionError> result=new ArrayList<NodeExecutionError>();
+ List<ExecutionErrorResource> executionErrors = jpa.getWorker().getExperiment(experimentId).getData().getExecutionErrors(Source.GFAC.toString(), experimentId, workflowInstanceId, nodeId, null);
+ for (ExecutionErrorResource errorResource : executionErrors) {
+ NodeExecutionError error = new NodeExecutionError();
+ setupValues(errorResource, error);
+ error.setExperimentId(errorResource.getExperimentDataResource().getExperimentID());
+ error.setNodeId(errorResource.getNodeID());
+ error.setWorkflowInstanceId(errorResource.getWorkflowDataResource().getWorkflowInstanceID());
+ result.add(error);
+ }
+ return result;
+ }
+
+ @Override
+ public List<GFacJobExecutionError> getGFacJobErrors(String experimentId,
+ String workflowInstanceId, String nodeId, String gfacJobId)
+ throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.getGFacJobErrors(experimentId, workflowInstanceId, nodeId, gfacJobId);
+ }
+ List<GFacJobExecutionError> result=new ArrayList<GFacJobExecutionError>();
+ List<ExecutionErrorResource> executionErrors = jpa.getWorker().getExperiment(experimentId).getData().getExecutionErrors(Source.GFAC.toString(), experimentId, workflowInstanceId, nodeId, gfacJobId);
+ for (ExecutionErrorResource errorResource : executionErrors) {
+ GFacJobExecutionError error = new GFacJobExecutionError();
+ setupValues(errorResource, error);
+ error.setExperimentId(errorResource.getExperimentDataResource().getExperimentID());
+ error.setGfacJobId(errorResource.getGfacJobID());
+ error.setNodeId(errorResource.getNodeID());
+ error.setWorkflowInstanceId(errorResource.getWorkflowDataResource().getWorkflowInstanceID());
+ result.add(error);
+ }
+ return result;
+ }
+
+ private void setupValues(ExecutionErrorResource source,
+ ExecutionError destination) {
+ destination.setActionTaken(source.getActionTaken());
+ destination.setErrorCode(source.getErrorCode());
+ destination.setErrorDescription(source.getErrorDes());
+ destination.setErrorLocation(source.getErrorLocation());
+ destination.setErrorMessage(source.getErrorMsg());
+ destination.setErrorReported(source.getErrorReporter());
+ destination.setErrorTime(source.getErrorTime());
+ destination.setSource(Source.valueOf(source.getSourceType()));
+ destination.setErrorReference(source.getErrorReference());
+ }
+
+ @Override
+ public List<GFacJobExecutionError> getGFacJobErrors(String gfacJobId)
+ throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.getGFacJobErrors(gfacJobId);
+ }
+ return getGFacJobErrors(null, null, null, gfacJobId);
+ }
+
+ @Override
+ public List<ExecutionError> getExecutionErrors(String experimentId,
+ String workflowInstanceId, String nodeId, String gfacJobId,
+ Source... filterBy) throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.getExecutionErrors(experimentId, workflowInstanceId, nodeId, gfacJobId, filterBy);
+ }
+ List<ExecutionError> errors = new ArrayList<ExecutionError>();
+ for (Source sourceType : filterBy) {
+ if (sourceType==Source.ALL){
+ errors.addAll(getExperimentExecutionErrors(experimentId));
+ errors.addAll(getWorkflowExecutionErrors(experimentId, workflowInstanceId));
+ errors.addAll(getNodeExecutionErrors(experimentId, workflowInstanceId, nodeId));
+ errors.addAll(getGFacJobErrors(experimentId, workflowInstanceId, nodeId, gfacJobId));
+ break;
+ } else if (sourceType==Source.EXPERIMENT){
+ errors.addAll(getExperimentExecutionErrors(experimentId));
+ } else if (sourceType==Source.WORKFLOW){
+ errors.addAll(getWorkflowExecutionErrors(experimentId, workflowInstanceId));
+ } else if (sourceType==Source.NODE){
+ errors.addAll(getNodeExecutionErrors(experimentId, workflowInstanceId, nodeId));
+ } else if (sourceType==Source.GFAC){
+ errors.addAll(getGFacJobErrors(experimentId, workflowInstanceId, nodeId, gfacJobId));
+ }
+ }
+ return errors;
+ }
+
+// @Override
+// public List<ExecutionError> getAllExperimentErrors(String experimentId,
+// Source... filterBy) throws RegistryException {
+// return getExecutionErrors(experimentId, null, null, null, filterBy);
+// }
+// @Override
+// public List<ExecutionError> getAllWorkflowErrors(String experimentId,
+// String workflowInstanceId, Source... filterBy)
+// throws RegistryException {
+// return getExecutionErrors(experimentId, workflowInstanceId, null, null, filterBy);
+// }
+// @Override
+// public List<ExecutionError> getAllNodeErrors(String experimentId,
+// String workflowInstanceId, String nodeId, Source... filterBy)
+// throws RegistryException {
+// return getExecutionErrors(experimentId, workflowInstanceId, nodeId, null, filterBy);
+// }
+
+ @Override
+ public int addExperimentError(ExperimentExecutionError error)
+ throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.addExperimentError(error);
+ }
+ ExecutionErrorResource executionError = createNewExecutionErrorResource(error.getExperimentId(),error,ExecutionErrors.Source.EXPERIMENT);
+ executionError.save();
+ return 0;
+ }
+
+ private ExecutionErrorResource createNewExecutionErrorResource(
+ String experimentId, ExecutionError errorSource, ExecutionErrors.Source type) throws RegistryException {
+ if (!isExperimentExists(experimentId)){
+ throw new ExperimentDoesNotExistsException(experimentId);
+ }
+ ExecutionErrorResource executionError = jpa.getWorker().getExperiment(experimentId).getData().createExecutionError();
+ setupValues(errorSource, executionError);
+ executionError.setSourceType(type.toString());
+ return executionError;
+ }
+
+ private void setupValues(ExecutionError source,
+ ExecutionErrorResource destination) {
+ destination.setErrorCode(source.getErrorCode());
+ destination.setErrorDes(source.getErrorDescription());
+ destination.setErrorLocation(source.getErrorLocation());
+ destination.setErrorMsg(source.getErrorMessage());
+ destination.setErrorReference(source.getErrorReference());
+ destination.setErrorReporter(source.getErrorReported());
+ destination.setErrorTime(new Timestamp(source.getErrorTime().getTime()));
+ destination.setActionTaken(source.getActionTaken());
+ }
+
+ @Override
+ public int addWorkflowExecutionError(WorkflowExecutionError error)
+ throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.addWorkflowExecutionError(error);
+ }
+ ExecutionErrorResource executionError = createNewExecutionErrorResource(error.getExperimentId(),error,ExecutionErrors.Source.WORKFLOW);
+ executionError.setWorkflowDataResource(jpa.getWorker().getExperiment(error.getExperimentId()).getData().getWorkflowInstance(error.getWorkflowInstanceId()));
+ executionError.save();
+ return 0;
+ }
+
+ @Override
+ public int addNodeExecutionError(NodeExecutionError error)
+ throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.addNodeExecutionError(error);
+ }
+ ExecutionErrorResource executionError = createNewExecutionErrorResource(error.getExperimentId(),error,ExecutionErrors.Source.WORKFLOW);
+ executionError.setWorkflowDataResource(jpa.getWorker().getExperiment(error.getExperimentId()).getData().getWorkflowInstance(error.getWorkflowInstanceId()));
+ executionError.setNodeID(error.getNodeId());
+ executionError.save();
+ return 0;
+ }
+
+ @Override
+ public int addGFacJobExecutionError(GFacJobExecutionError error)
+ throws RegistryException {
+ if (provenanceRegistry != null){
+ return provenanceRegistry.addGFacJobExecutionError(error);
+ }
+ ExecutionErrorResource executionError = createNewExecutionErrorResource(error.getExperimentId(),error,ExecutionErrors.Source.WORKFLOW);
+ executionError.setWorkflowDataResource(jpa.getWorker().getExperiment(error.getExperimentId()).getData().getWorkflowInstance(error.getWorkflowInstanceId()));
+ executionError.setNodeID(error.getNodeId());
+ executionError.setGfacJobID(error.getGfacJobId());
+ executionError.save();
+ return 0;
+ }
+
}
Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_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?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_Error.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Execution_Error.java Mon May 13 20:05:01 2013
@@ -21,8 +21,14 @@
package org.apache.airavata.persistance.registry.jpa.model;
-import javax.persistence.*;
-import java.security.Timestamp;
+import java.sql.Timestamp;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.Lob;
+import javax.persistence.ManyToOne;
@Entity
public class Execution_Error {
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=1482058&r1=1482057&r2=1482058&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 Mon May 13 20:05:01 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 = "Execution_Error";
+ public static final String EXECUTION_ERROR = "Execution_Error";
//Gateway Table
public final class GatewayConstants {
Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.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?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExecutionErrorResource.java Mon May 13 20:05:01 2013
@@ -1,18 +1,19 @@
package org.apache.airavata.persistance.registry.jpa.resources;
+import java.sql.Timestamp;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+
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.Experiment_Data;
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.Workflow_Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.persistence.EntityManager;
-import java.security.Timestamp;
-import java.util.List;
-
public class ExecutionErrorResource extends AbstractResource {
private final static Logger logger = LoggerFactory.getLogger(ExecutionErrorResource.class);
private ExperimentDataResource experimentDataResource;
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=1482058&r1=1482057&r2=1482058&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 Mon May 13 20:05:01 2013
@@ -74,6 +74,10 @@ public class ExperimentDataResource exte
WorkflowDataResource workflowDataResource = new WorkflowDataResource();
workflowDataResource.setExperimentID(experimentID);
return workflowDataResource;
+ case EXECUTION_ERROR:
+ ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
+ executionErrorResource.setExperimentDataResource(this);
+ return executionErrorResource;
case EXPERIMENT_METADATA:
ExperimentMetadataResource experimentMetadataResource = new ExperimentMetadataResource();
experimentMetadataResource.setExpID(experimentID);
@@ -181,7 +185,7 @@ public class ExperimentDataResource exte
}
break;
case EXECUTION_ERROR:
- generator = new QueryGenerator(NODE_ERROR);
+ generator = new QueryGenerator(EXECUTION_ERROR);
generator.setParameter(ExecutionErrorConstants.EXPERIMENT_ID, experimentID);
q = generator.selectQuery(em);
results = q.getResultList();
@@ -257,6 +261,10 @@ public class ExperimentDataResource exte
return (ExperimentMetadataResource)create(ResourceType.EXPERIMENT_METADATA);
}
+ public ExecutionErrorResource createExecutionError(){
+ return (ExecutionErrorResource) create(ResourceType.EXECUTION_ERROR);
+ }
+
public void removeWorkflowInstance(String workflowInstanceId){
remove(ResourceType.WORKFLOW_DATA, workflowInstanceId);
}
@@ -264,4 +272,41 @@ public class ExperimentDataResource exte
public void removeExperimentMetadata(){
remove(ResourceType.EXPERIMENT_METADATA,getExperimentID());
}
+
+ public List<ExecutionErrorResource> getExecutionErrors(String type, String experimentId, String workflowInstanceId, String nodeId, String gfacJobId){
+ List<ExecutionErrorResource> resourceList = new ArrayList<ExecutionErrorResource>();
+ EntityManager em = ResourceUtils.getEntityManager();
+ em.getTransaction().begin();
+ Query q;
+ QueryGenerator generator;
+ List<?> results;
+ generator = new QueryGenerator(EXECUTION_ERROR);
+ if (experimentId!=null){
+ generator.setParameter(ExecutionErrorConstants.EXPERIMENT_ID, experimentId);
+ }
+ if (type!=null){
+ generator.setParameter(ExecutionErrorConstants.SOURCE_TYPE, type);
+ }
+ if (workflowInstanceId!=null){
+ generator.setParameter(ExecutionErrorConstants.WORKFLOW_ID, workflowInstanceId);
+ }
+ if (nodeId!=null){
+ generator.setParameter(ExecutionErrorConstants.NODE_ID, nodeId);
+ }
+ if (gfacJobId!=null){
+ generator.setParameter(ExecutionErrorConstants.GFAC_JOB_ID, gfacJobId);
+ }
+ q = generator.selectQuery(em);
+ results = q.getResultList();
+ if (results.size() != 0) {
+ for (Object result : results) {
+ Execution_Error executionError = (Execution_Error)result;
+ ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR, executionError);
+ resourceList.add(executionErrorResource);
+ }
+ }
+ em.getTransaction().commit();
+ em.close();
+ return resourceList;
+ }
}
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=1482058&r1=1482057&r2=1482058&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 Mon May 13 20:05:01 2013
@@ -139,7 +139,7 @@ public class NodeDataResource extends Ab
List<?> results;
switch (type){
case EXECUTION_ERROR:
- generator = new QueryGenerator(NODE_ERROR);
+ generator = new QueryGenerator(EXECUTION_ERROR);
generator.setParameter(ExecutionErrorConstants.NODE_ID, nodeID);
q = generator.selectQuery(em);
results = q.getResultList();
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java?rev=1482058&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java Mon May 13 20:05:01 2013
@@ -0,0 +1,33 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api;
+
+public class ExecutionErrors {
+ public static enum Source{
+ ALL,
+ EXPERIMENT,
+ WORKFLOW,
+ NODE,
+ GFAC
+ }
+
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java Mon May 13 20:05:01 2013
@@ -118,7 +118,7 @@ public interface ProvenanceRegistry exte
public abstract void setWorkflowInstanceTemplateName(String workflowInstanceId, String templateName) throws RegistryException;
public List<WorkflowExecution> getExperimentWorkflowInstances(String experimentId) throws RegistryException;
-
+
/*-------------------------------------- Experiment Workflow instance node data ----------------------------------------*/
public boolean isWorkflowInstanceExists(String instanceId) throws RegistryException;
@@ -326,4 +326,130 @@ public interface ProvenanceRegistry exte
public void updateWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type) throws RegistryException;
public void addWorkflowInstanceNode(String workflowInstance, String nodeId) throws RegistryException;
+
+ /*
+ * Errors in experiment executions
+ */
+
+ /**
+ * Return errors defined at the experiment level
+ * @param experimentId
+ * @return
+ * @throws RegistryException
+ */
+ public List<ExperimentExecutionError> getExperimentExecutionErrors(String experimentId) throws RegistryException;
+
+ /**
+ * Return errors defined at the workflow level
+ * @param experimentId
+ * @param workflowInstanceId
+ * @return
+ * @throws RegistryException
+ */
+ public List<WorkflowExecutionError> getWorkflowExecutionErrors(String experimentId, String workflowInstanceId) throws RegistryException;
+
+ /**
+ * Return errors defined at the node level
+ * @param experimentId
+ * @param workflowInstanceId
+ * @param nodeId
+ * @return
+ * @throws RegistryException
+ */
+ public List<NodeExecutionError> getNodeExecutionErrors(String experimentId, String workflowInstanceId, String nodeId) throws RegistryException;
+
+ /**
+ * Return errors defined for a GFac job
+ * @param experimentId
+ * @param workflowInstanceId
+ * @param nodeId
+ * @param gfacJobId
+ * @return
+ * @throws RegistryException
+ */
+ public List<GFacJobExecutionError> getGFacJobErrors(String experimentId, String workflowInstanceId, String nodeId, String gfacJobId) throws RegistryException;
+
+ /**
+ * Return errors defined for a GFac job
+ * @param gfacJobId
+ * @return
+ * @throws RegistryException
+ */
+ public List<GFacJobExecutionError> getGFacJobErrors(String gfacJobId) throws RegistryException;
+
+ /**
+ * Return errors filtered by the parameters
+ * @param experimentId
+ * @param workflowInstanceId
+ * @param nodeId
+ * @param gfacJobId
+ * @param filterBy - what type of source types the results should contain
+ * @return
+ * @throws RegistryException
+ */
+ public List<ExecutionError> getExecutionErrors(String experimentId, String workflowInstanceId, String nodeId, String gfacJobId, ExecutionErrors.Source...filterBy) throws RegistryException;
+
+
+
+// /**
+// * Return errors defined for the experiment Id
+// * @param experimentId
+// * @param filterBy - what type of source types the results should contain
+// * @return
+// * @throws RegistryException
+// */
+// public List<ExecutionError> getAllExperimentErrors(String experimentId, ExecutionErrors.Source...filterBy) throws RegistryException;
+//
+// /**
+// * Return errors defined for the workflow instance
+// * @param experimentId
+// * @param workflowInstanceId
+// * @param filterBy - what type of source types the results should contain
+// * @return
+// * @throws RegistryException
+// */
+// public List<ExecutionError> getAllWorkflowErrors(String experimentId, String workflowInstanceId, ExecutionErrors.Source...filterBy) throws RegistryException;
+//
+// /**
+// * Return errors defined for the node execution
+// * @param experimentId
+// * @param workflowInstanceId
+// * @param nodeId
+// * @param filterBy - what type of source types the results should contain
+// * @return
+// * @throws RegistryException
+// */
+// public List<ExecutionError> getAllNodeErrors(String experimentId, String workflowInstanceId, String nodeId, ExecutionErrors.Source...filterBy) throws RegistryException;
+
+ /**
+ * Adds an experiment execution error
+ * @param error
+ * @return
+ * @throws RegistryException
+ */
+ public int addExperimentError(ExperimentExecutionError error) throws RegistryException;
+
+ /**
+ * Adds an workflow execution error
+ * @param error
+ * @return
+ * @throws RegistryException
+ */
+ public int addWorkflowExecutionError(WorkflowExecutionError error) throws RegistryException;
+
+ /**
+ * Adds an node execution error
+ * @param error
+ * @return
+ * @throws RegistryException
+ */
+ public int addNodeExecutionError(NodeExecutionError error) throws RegistryException;
+
+ /**
+ * Adds an GFac job execution error
+ * @param error
+ * @return
+ * @throws RegistryException
+ */
+ public int addGFacJobExecutionError(GFacJobExecutionError error) throws RegistryException;
}
\ No newline at end of file
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java?rev=1482058&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java Mon May 13 20:05:01 2013
@@ -0,0 +1,94 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api.workflow;
+
+import java.util.Date;
+
+import org.apache.airavata.registry.api.ExecutionErrors;
+
+public abstract class ExecutionError {
+ public ExecutionErrors.Source source;
+ public Date errorTime;
+ public String errorCode;
+ public String errorMessage;
+ public String errorDescription;
+ public String errorLocation;
+ public String actionTaken;
+ private String errorReported;
+ private int errorReference;
+
+ public ExecutionErrors.Source getSource() {
+ return source;
+ }
+ public void setSource(ExecutionErrors.Source source) {
+ this.source = source;
+ }
+ public Date getErrorTime() {
+ return errorTime;
+ }
+ public void setErrorTime(Date errorTime) {
+ this.errorTime = errorTime;
+ }
+ public String getErrorCode() {
+ return errorCode;
+ }
+ public void setErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ }
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+ public String getErrorDescription() {
+ return errorDescription;
+ }
+ public void setErrorDescription(String errorDescription) {
+ this.errorDescription = errorDescription;
+ }
+ public String getErrorLocation() {
+ return errorLocation;
+ }
+ public void setErrorLocation(String errorLocation) {
+ this.errorLocation = errorLocation;
+ }
+ public String getActionTaken() {
+ return actionTaken;
+ }
+ public void setActionTaken(String actionTaken) {
+ this.actionTaken = actionTaken;
+ }
+ public String getErrorReported() {
+ return errorReported;
+ }
+ public void setErrorReported(String errorReported) {
+ this.errorReported = errorReported;
+ }
+ public int getErrorReference() {
+ return errorReference;
+ }
+ public void setErrorReference(int errorReference) {
+ this.errorReference = errorReference;
+ }
+
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java?rev=1482058&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java Mon May 13 20:05:01 2013
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api.workflow;
+
+public class ExperimentExecutionError extends ExecutionError {
+ private String experimentId;
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJobExecutionError.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJobExecutionError.java?rev=1482058&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJobExecutionError.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJobExecutionError.java Mon May 13 20:05:01 2013
@@ -0,0 +1,61 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api.workflow;
+
+public class GFacJobExecutionError extends ExecutionError {
+ private String experimentId;
+ private String workflowInstanceId;
+ private String nodeId;
+ private String gfacJobId;
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ public String getGfacJobId() {
+ return gfacJobId;
+ }
+
+ public void setGfacJobId(String gfacJobId) {
+ this.gfacJobId = gfacJobId;
+ }
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJobExecutionError.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java?rev=1482058&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java Mon May 13 20:05:01 2013
@@ -0,0 +1,52 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api.workflow;
+
+public class NodeExecutionError extends ExecutionError {
+ private String experimentId;
+ private String workflowInstanceId;
+ private String nodeId;
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java?rev=1482058&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java Mon May 13 20:05:01 2013
@@ -0,0 +1,43 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api.workflow;
+
+public class WorkflowExecutionError extends ExecutionError {
+ private String experimentId;
+ private String workflowInstanceId;
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java (original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java Mon May 13 20:05:01 2013
@@ -33,13 +33,13 @@ import org.apache.airavata.commons.gfac.
import org.apache.airavata.registry.api.AiravataExperiment;
import org.apache.airavata.registry.api.AiravataRegistry2;
import org.apache.airavata.registry.api.AiravataUser;
+import org.apache.airavata.registry.api.ExecutionErrors.Source;
import org.apache.airavata.registry.api.PasswordCallback;
import org.apache.airavata.registry.api.ResourceMetadata;
import org.apache.airavata.registry.api.WorkspaceProject;
import org.apache.airavata.registry.api.exception.RegistryException;
import org.apache.airavata.registry.api.exception.worker.ExperimentDoesNotExistsException;
import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.NodeExecutionData;
import org.apache.airavata.rest.utils.CookieManager;
public class RegistryClient extends AiravataRegistry2 {
@@ -836,4 +836,77 @@ public class RegistryClient extends Aira
public PasswordCallback getCallback() {
return callback;
}
+
+ @Override
+ public List<ExperimentExecutionError> getExperimentExecutionErrors(
+ String experimentId) throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<WorkflowExecutionError> getWorkflowExecutionErrors(
+ String experimentId, String workflowInstanceId)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<NodeExecutionError> getNodeExecutionErrors(String experimentId,
+ String workflowInstanceId, String nodeId) throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<GFacJobExecutionError> getGFacJobErrors(String experimentId,
+ String workflowInstanceId, String nodeId, String gfacJobId)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<GFacJobExecutionError> getGFacJobErrors(String gfacJobId)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<ExecutionError> getExecutionErrors(String experimentId,
+ String workflowInstanceId, String nodeId, String gfacJobId,
+ Source... filterBy) throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int addExperimentError(ExperimentExecutionError error)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int addWorkflowExecutionError(WorkflowExecutionError error)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int addNodeExecutionError(NodeExecutionError error)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int addGFacJobExecutionError(GFacJobExecutionError error)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
}
Modified: airavata/trunk/modules/workflow-model/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/workflow-model/pom.xml?rev=1482058&r1=1482057&r2=1482058&view=diff
==============================================================================
--- airavata/trunk/modules/workflow-model/pom.xml (original)
+++ airavata/trunk/modules/workflow-model/pom.xml Mon May 13 20:05:01 2013
@@ -27,5 +27,6 @@
<module>workflow-model-core</module>
<module>workflow-model-component</module>
<module>workflow-model-component-node</module>
+ <!--module>workflow-engine</module-->
</modules>
</project>
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=1482058&r1=1482057&r2=1482058&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 May 13 20:05:01 2013
@@ -28,7 +28,7 @@ public class ApplicationVersion {
/**
* Version number
*/
- public final static Version VERSION = new Version("Airavata",0,7,null,null,null);
+ public final static Version VERSION = new Version("Airavata",0,8,null,null,null);
/**
* Prints the version