airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [2/3] airavata git commit: registry related compilation issues
Date Mon, 15 Jun 2015 20:07:15 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/869df7ec/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
index c4865ef..038f916 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
@@ -27,11 +27,9 @@ import org.apache.airavata.model.application.io.OutputDataObjectType;
 import org.apache.airavata.model.commons.ErrorModel;
 import org.apache.airavata.model.commons.airavata_commonsConstants;
 import org.apache.airavata.model.experiment.*;
+import org.apache.airavata.model.job.JobModel;
 import org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel;
-import org.apache.airavata.model.status.ExperimentState;
-import org.apache.airavata.model.status.ExperimentStatus;
-import org.apache.airavata.model.status.JobStatus;
-import org.apache.airavata.model.status.TaskStatus;
+import org.apache.airavata.model.status.*;
 import org.apache.airavata.model.task.TaskModel;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
@@ -72,27 +70,23 @@ public class ExperimentRegistry {
                 ExpCatResourceUtils.addUser(experiment.getUserName(), null);
             }
 
-            experimentID = getExperimentID(experiment.getName());
-            experiment.setExperimentID(experimentID);
+            experimentID = getExperimentID(experiment.getExperimentName());
+            experiment.setExperimentId(experimentID);
             ExperimentResource experimentResource = new ExperimentResource();
             experimentResource.setExpID(experimentID);
-            experimentResource.setExpName(experiment.getName());
+            experimentResource.setExpName(experiment.getExperimentName());
             experimentResource.setExecutionUser(experiment.getUserName());
             experimentResource.setGatewayId(gatewayId);
             experimentResource.setGatewayExecutionId(experiment.getGatewayExecutionId());
             experimentResource.setEnableEmailNotifications(experiment.isEnableEmailNotification());
-            if (!workerResource.isProjectExists(experiment.getProjectID())) {
+            if (!workerResource.isProjectExists(experiment.getProjectId())) {
                 logger.error("Project does not exist in the system..");
                 throw new Exception("Project does not exist in the system, Please create the project first...");
             }
-            experimentResource.setProjectId(experiment.getProjectID());
+            experimentResource.setProjectId(experiment.getProjectId());
             experimentResource.setCreationTime(AiravataUtils.getTime(experiment.getCreationTime()));
             experimentResource.setDescription(experiment.getDescription());
-            experimentResource.setApplicationId(experiment.getApplicationId());
-            experimentResource.setApplicationVersion(experiment.getApplicationVersion());
-            experimentResource.setWorkflowTemplateId(experiment.getWorkflowTemplateId());
-            experimentResource.setWorkflowTemplateVersion(experiment.getWorkflowTemplateVersion());
-            experimentResource.setWorkflowExecutionId(experiment.getWorkflowExecutionInstanceId());
+            experimentResource.setApplicationId(experiment.getExecutionId());
             experimentResource.save();
 
             List<String> emailAddresses = experiment.getEmailAddresses();
@@ -110,7 +104,7 @@ public class ExperimentRegistry {
                 addExpInputs(experimentInputs, experimentResource);
             }
 
-            UserConfigurationData userConfigurationData = experiment.getUserConfigurationData();
+            UserConfigurationDataModel userConfigurationData = experiment.getUserConfigurationData();
             if (userConfigurationData != null) {
                 addUserConfigData(userConfigurationData, experimentID);
             }
@@ -129,19 +123,19 @@ public class ExperimentRegistry {
 //                updateExperimentStatus(experimentStatus, experimentID);
 //            }else {
             ExperimentStatus experimentStatus = new ExperimentStatus();
-            experimentStatus.setExperimentState(ExperimentState.CREATED);
+            experimentStatus.setState(ExperimentState.CREATED);
             updateExperimentStatus(experimentStatus, experimentID);
 //            }
 
-            List<WorkflowNodeDetails> workflowNodeDetailsList = experiment.getWorkflowNodeDetailsList();
-            if (workflowNodeDetailsList != null && !workflowNodeDetailsList.isEmpty()) {
-                for (WorkflowNodeDetails wf : workflowNodeDetailsList) {
-                    addWorkflowNodeDetails(wf, experimentID);
-                }
-            }
-            List<ErrorDetails> errors = experiment.getErrors();
+//            List<WorkflowNodeDetails> workflowNodeDetailsList = experiment.getWorkflowNodeDetailsList();
+//            if (workflowNodeDetailsList != null && !workflowNodeDetailsList.isEmpty()) {
+//                for (WorkflowNodeDetails wf : workflowNodeDetailsList) {
+//                    addWorkflowNodeDetails(wf, experimentID);
+//                }
+//            }
+            List<ErrorModel> errors = experiment.getErrors();
             if (errors != null && !errors.isEmpty()) {
-                for (ErrorDetails errror : errors) {
+                for (ErrorModel errror : errors) {
                     addErrorDetails(errror, experimentID);
                 }
             }
@@ -152,7 +146,7 @@ public class ExperimentRegistry {
         return experimentID;
     }
 
-    public String addUserConfigData(UserConfigurationData configurationData, String experimentID) throws RegistryException {
+    public String addUserConfigData(UserConfigurationDataModel configurationData, String experimentID) throws RegistryException {
         try {
             ExperimentResource experiment = gatewayResource.getExperiment(experimentID);
             ConfigDataResource configData = (ConfigDataResource) experiment.create(ResourceType.CONFIG_DATA);
@@ -163,24 +157,24 @@ public class ExperimentRegistry {
             configData.setUserDn(configurationData.getUserDN());
             configData.setGenerateCert(configurationData.isGenerateCert());
             configData.save();
-            ComputationalResourceScheduling resourceScheduling = configurationData.getComputationalResourceScheduling();
+            ComputationalResourceSchedulingModel resourceScheduling = configurationData.getComputationalResourceScheduling();
             if (resourceScheduling != null) {
                 addComputationScheduling(resourceScheduling, experiment);
             }
-            AdvancedInputDataHandling inputDataHandling = configurationData.getAdvanceInputDataHandling();
-            if (inputDataHandling != null) {
-                addInputDataHandling(inputDataHandling, experiment);
-            }
-
-            AdvancedOutputDataHandling outputDataHandling = configurationData.getAdvanceOutputDataHandling();
-            if (outputDataHandling != null) {
-                addOutputDataHandling(outputDataHandling, experiment);
-            }
-
-            QualityOfServiceParams qosParams = configurationData.getQosParams();
-            if (qosParams != null) {
-                addQosParams(qosParams, experiment);
-            }
+//            AdvancedInputDataHandling inputDataHandling = configurationData.getAdvanceInputDataHandling();
+//            if (inputDataHandling != null) {
+//                addInputDataHandling(inputDataHandling, experiment);
+//            }
+//
+//            AdvancedOutputDataHandling outputDataHandling = configurationData.getAdvanceOutputDataHandling();
+//            if (outputDataHandling != null) {
+//                addOutputDataHandling(outputDataHandling, experiment);
+//            }
+//
+//            QualityOfServiceParams qosParams = configurationData.getQosParams();
+//            if (qosParams != null) {
+//                addQosParams(qosParams, experiment);
+//            }
         } catch (Exception e) {
             logger.error("Unable to save user config data", e);
             throw new RegistryException(e);
@@ -188,86 +182,86 @@ public class ExperimentRegistry {
         return experimentID;
     }
 
-    public void addQosParams(QualityOfServiceParams qosParams, ExperimentCatResource resource) throws RegistryException {
-        try {
-            QosParamResource qosr = new QosParamResource();
-            if (resource instanceof ExperimentResource) {
-                ExperimentResource experiment = (ExperimentResource) resource;
-                qosr.setExperimentId(experiment.getExpID());
-            }
-            if (resource instanceof TaskDetailResource) {
-                TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
-                qosr.setTaskId(taskDetailResource.getTaskId());
-                String nodeId = taskDetailResource.getNodeId();
-                ExperimentResource experimentResource = new ExperimentResource();
-                WorkflowNodeDetailResource workflowNode = experimentResource.getWorkflowNode(nodeId);
-                qosr.setExperimentId(workflowNode.getExperimentId());
-            }
-            qosr.setStartExecutionAt(qosParams.getStartExecutionAt());
-            qosr.setExecuteBefore(qosParams.getExecuteBefore());
-            qosr.setNoOfRetries(qosParams.getNumberofRetries());
-            qosr.save();
-        } catch (Exception e) {
-            logger.error("Unable to save QOS params", e);
-            throw new RegistryException(e);
-        }
-
-    }
-
-    public void addOutputDataHandling(AdvancedOutputDataHandling outputDataHandling, ExperimentCatResource resource) throws RegistryException {
-        AdvancedOutputDataHandlingResource adodh = new AdvancedOutputDataHandlingResource();
-        try {
-            if (resource instanceof ExperimentResource) {
-                ExperimentResource experiment = (ExperimentResource) resource;
-                adodh.setExperimentId(experiment.getExpID());
-            }
-            if (resource instanceof TaskDetailResource) {
-                TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
-                String nodeId = taskDetailResource.getNodeId();
-                ExperimentResource experimentResource = new ExperimentResource();
-                WorkflowNodeDetailResource workflowNode = experimentResource.getWorkflowNode(nodeId);
-                adodh.setExperimentId(workflowNode.getExperimentId());
-                adodh.setTaskId(taskDetailResource.getTaskId());
-            }
-            adodh.setOutputDataDir(outputDataHandling.getOutputDataDir());
-            adodh.setDataRegUrl(outputDataHandling.getDataRegistryURL());
-            adodh.setPersistOutputData(outputDataHandling.isPersistOutputData());
-            adodh.save();
-        } catch (Exception e) {
-            logger.error("Unable to save output data handling data", e);
-            throw new RegistryException(e);
-        }
-
-    }
+//    public void addQosParams(QualityOfServiceParams qosParams, ExperimentCatResource resource) throws RegistryException {
+//        try {
+//            QosParamResource qosr = new QosParamResource();
+//            if (resource instanceof ExperimentResource) {
+//                ExperimentResource experiment = (ExperimentResource) resource;
+//                qosr.setExperimentId(experiment.getExpID());
+//            }
+//            if (resource instanceof TaskDetailResource) {
+//                TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
+//                qosr.setTaskId(taskDetailResource.getTaskId());
+//                String nodeId = taskDetailResource.getNodeId();
+//                ExperimentResource experimentResource = new ExperimentResource();
+//                WorkflowNodeDetailResource workflowNode = experimentResource.getWorkflowNode(nodeId);
+//                qosr.setExperimentId(workflowNode.getExperimentId());
+//            }
+//            qosr.setStartExecutionAt(qosParams.getStartExecutionAt());
+//            qosr.setExecuteBefore(qosParams.getExecuteBefore());
+//            qosr.setNoOfRetries(qosParams.getNumberofRetries());
+//            qosr.save();
+//        } catch (Exception e) {
+//            logger.error("Unable to save QOS params", e);
+//            throw new RegistryException(e);
+//        }
+//
+//    }
 
-    public void addInputDataHandling(AdvancedInputDataHandling inputDataHandling, ExperimentCatResource resource) throws RegistryException {
-        AdvanceInputDataHandlingResource adidh = new AdvanceInputDataHandlingResource();
-        try {
-            if (resource instanceof ExperimentResource) {
-                ExperimentResource experiment = (ExperimentResource) resource;
-                adidh.setExperimentId(experiment.getExpID());
-            }
-            if (resource instanceof TaskDetailResource) {
-                TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
-                String nodeId = taskDetailResource.getNodeId();
-                ExperimentResource experimentResource = new ExperimentResource();
-                WorkflowNodeDetailResource workflowNode = experimentResource.getWorkflowNode(nodeId);
-                adidh.setExperimentId(workflowNode.getExperimentId());
-                adidh.setTaskId(taskDetailResource.getTaskId());
-            }
-            adidh.setWorkingDir(inputDataHandling.getUniqueWorkingDirectory());
-            adidh.setWorkingDirParent(inputDataHandling.getParentWorkingDirectory());
-            adidh.setStageInputFiles(inputDataHandling.isSetStageInputFilesToWorkingDir());
-            adidh.setCleanAfterJob(inputDataHandling.isCleanUpWorkingDirAfterJob());
-            adidh.save();
-        } catch (Exception e) {
-            logger.error("Unable to save input data handling data", e);
-            throw new RegistryException(e);
-        }
+//    public void addOutputDataHandling(AdvancedOutputDataHandling outputDataHandling, ExperimentCatResource resource) throws RegistryException {
+//        AdvancedOutputDataHandlingResource adodh = new AdvancedOutputDataHandlingResource();
+//        try {
+//            if (resource instanceof ExperimentResource) {
+//                ExperimentResource experiment = (ExperimentResource) resource;
+//                adodh.setExperimentId(experiment.getExpID());
+//            }
+//            if (resource instanceof TaskDetailResource) {
+//                TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
+//                String nodeId = taskDetailResource.getNodeId();
+//                ExperimentResource experimentResource = new ExperimentResource();
+//                WorkflowNodeDetailResource workflowNode = experimentResource.getWorkflowNode(nodeId);
+//                adodh.setExperimentId(workflowNode.getExperimentId());
+//                adodh.setTaskId(taskDetailResource.getTaskId());
+//            }
+//            adodh.setOutputDataDir(outputDataHandling.getOutputDataDir());
+//            adodh.setDataRegUrl(outputDataHandling.getDataRegistryURL());
+//            adodh.setPersistOutputData(outputDataHandling.isPersistOutputData());
+//            adodh.save();
+//        } catch (Exception e) {
+//            logger.error("Unable to save output data handling data", e);
+//            throw new RegistryException(e);
+//        }
+//
+//    }
 
-    }
+//    public void addInputDataHandling(AdvancedInputDataHandling inputDataHandling, ExperimentCatResource resource) throws RegistryException {
+//        AdvanceInputDataHandlingResource adidh = new AdvanceInputDataHandlingResource();
+//        try {
+//            if (resource instanceof ExperimentResource) {
+//                ExperimentResource experiment = (ExperimentResource) resource;
+//                adidh.setExperimentId(experiment.getExpID());
+//            }
+//            if (resource instanceof TaskDetailResource) {
+//                TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
+//                String nodeId = taskDetailResource.getNodeId();
+//                ExperimentResource experimentResource = new ExperimentResource();
+//                WorkflowNodeDetailResource workflowNode = experimentResource.getWorkflowNode(nodeId);
+//                adidh.setExperimentId(workflowNode.getExperimentId());
+//                adidh.setTaskId(taskDetailResource.getTaskId());
+//            }
+//            adidh.setWorkingDir(inputDataHandling.getUniqueWorkingDirectory());
+//            adidh.setWorkingDirParent(inputDataHandling.getParentWorkingDirectory());
+//            adidh.setStageInputFiles(inputDataHandling.isSetStageInputFilesToWorkingDir());
+//            adidh.setCleanAfterJob(inputDataHandling.isCleanUpWorkingDirAfterJob());
+//            adidh.save();
+//        } catch (Exception e) {
+//            logger.error("Unable to save input data handling data", e);
+//            throw new RegistryException(e);
+//        }
+//
+//    }
 
-    public void addComputationScheduling(ComputationalResourceScheduling resourceScheduling, ExperimentCatResource resource) throws RegistryException {
+    public void addComputationScheduling(ComputationalResourceSchedulingModel resourceScheduling, ExperimentCatResource resource) throws RegistryException {
         ComputationSchedulingResource cmsr = new ComputationSchedulingResource();
         try {
             if (resource instanceof ExperimentResource) {
@@ -288,9 +282,8 @@ public class ExperimentRegistry {
             cmsr.setNumberOfThreads(resourceScheduling.getNumberOfThreads());
             cmsr.setQueueName(resourceScheduling.getQueueName());
             cmsr.setWalltimeLimit(resourceScheduling.getWallTimeLimit());
-            cmsr.setJobStartTime(AiravataUtils.getTime(resourceScheduling.getJobStartTime()));
             cmsr.setPhysicalMemory(resourceScheduling.getTotalPhysicalMemory());
-            cmsr.setProjectName(resourceScheduling.getComputationalProjectAccount());
+            cmsr.setChessisName(resourceScheduling.getChessisNumber());
             cmsr.save();
         } catch (Exception e) {
             logger.error("Unable to save computational scheduling data", e);
@@ -500,65 +493,65 @@ public class ExperimentRegistry {
             }
             status.setExperimentId(expId);
             status.setStatusUpdateTime(AiravataUtils.getTime(experimentStatus.getTimeOfStateChange()));
-            if (status.getState() == null) {
-                status.setState(ExperimentState.UNKNOWN.name());
-            }
-            if (isValidStatusTransition(ExperimentState.valueOf(status.getState()), experimentStatus.getExperimentState())) {
-                status.setState(experimentStatus.getExperimentState().toString());
+//            if (status.getState() == null) {
+//                status.setState(ExperimentState.UNKNOWN.name());
+//            }
+            if (isValidStatusTransition(ExperimentState.valueOf(status.getState()), experimentStatus.getState())) {
+                status.setState(experimentStatus.getState().toString());
                 status.setStatusType(StatusType.EXPERIMENT.toString());
                 status.save();
-                logger.debugId(expId, "Updated experiment {} status to {}.", expId, experimentStatus.toString());
+                logger.debug(expId, "Updated experiment {} status to {}.", expId, experimentStatus.toString());
             }
         } catch (Exception e) {
-            logger.errorId(expId, "Error while updating experiment status...", e);
+            logger.error(expId, "Error while updating experiment status...", e);
             throw new RegistryException(e);
         }
         return expId;
     }
 
-    public String addWorkflowNodeStatus(WorkflowNodeStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            ExperimentResource experiment = gatewayResource.getExperiment((String) ids.getTopLevelIdentifier());
-            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode((String) ids.getSecondLevelIdentifier());
-            StatusResource statusResource = (StatusResource) experiment.create(ResourceType.STATUS);
-            statusResource.setExperimentId(experiment.getExpID());
-            statusResource.setNodeId(workflowNode.getNodeInstanceId());
-            statusResource.setStatusType(StatusType.WORKFLOW_NODE.toString());
-            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            if (status.getWorkflowNodeState() == null) {
-                statusResource.setState(WorkflowNodeState.UNKNOWN.toString());
-            } else {
-                statusResource.setState(status.getWorkflowNodeState().toString());
-            }
-            statusResource.save();
-            return String.valueOf(statusResource.getStatusId());
-        } catch (Exception e) {
-            logger.error("Error while adding workflow node status...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String updateWorkflowNodeStatus(WorkflowNodeStatus status, String nodeId) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode(nodeId);
-            StatusResource statusResource = workflowNode.getWorkflowNodeStatus();
-            if (statusResource == null) {
-                statusResource = (StatusResource) workflowNode.create(ResourceType.STATUS);
-            }
-            statusResource.setExperimentId(workflowNode.getExperimentId());
-            statusResource.setNodeId(nodeId);
-            statusResource.setStatusType(StatusType.WORKFLOW_NODE.toString());
-            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            statusResource.setState(status.getWorkflowNodeState().toString());
-            statusResource.save();
-            logger.debugId(nodeId, "Updated workflow node {} status to {}.", nodeId, status.toString());
-            return String.valueOf(statusResource.getStatusId());
-        } catch (Exception e) {
-            logger.errorId(nodeId, "Error while updating workflow node status to " + status.toString() + "...", e);
-            throw new RegistryException(e);
-        }
-    }
+//    public String addWorkflowNodeStatus(WorkflowNodeStatus status, CompositeIdentifier ids) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = gatewayResource.getExperiment((String) ids.getTopLevelIdentifier());
+//            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode((String) ids.getSecondLevelIdentifier());
+//            StatusResource statusResource = (StatusResource) experiment.create(ResourceType.STATUS);
+//            statusResource.setExperimentId(experiment.getExpID());
+//            statusResource.setNodeId(workflowNode.getNodeInstanceId());
+//            statusResource.setStatusType(StatusType.WORKFLOW_NODE.toString());
+//            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
+//            if (status.getWorkflowNodeState() == null) {
+//                statusResource.setState(WorkflowNodeState.UNKNOWN.toString());
+//            } else {
+//                statusResource.setState(status.getWorkflowNodeState().toString());
+//            }
+//            statusResource.save();
+//            return String.valueOf(statusResource.getStatusId());
+//        } catch (Exception e) {
+//            logger.error("Error while adding workflow node status...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
+//
+//    public String updateWorkflowNodeStatus(WorkflowNodeStatus status, String nodeId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode(nodeId);
+//            StatusResource statusResource = workflowNode.getWorkflowNodeStatus();
+//            if (statusResource == null) {
+//                statusResource = (StatusResource) workflowNode.create(ResourceType.STATUS);
+//            }
+//            statusResource.setExperimentId(workflowNode.getExperimentId());
+//            statusResource.setNodeId(nodeId);
+//            statusResource.setStatusType(StatusType.WORKFLOW_NODE.toString());
+//            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
+//            statusResource.setState(status.getWorkflowNodeState().toString());
+//            statusResource.save();
+//            logger.debugId(nodeId, "Updated workflow node {} status to {}.", nodeId, status.toString());
+//            return String.valueOf(statusResource.getStatusId());
+//        } catch (Exception e) {
+//            logger.errorId(nodeId, "Error while updating workflow node status to " + status.toString() + "...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
 
     public String addTaskStatus(TaskStatus status, CompositeIdentifier ids) throws RegistryException {
         try {
@@ -571,10 +564,10 @@ public class ExperimentRegistry {
             statusResource.setTaskId(taskDetail.getTaskId());
             statusResource.setStatusType(StatusType.TASK.toString());
             statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            if (status.getExecutionState() == null) {
-                statusResource.setState(TaskState.UNKNOWN.toString());
+            if (status.getState() == null) {
+//              statusResource.setState(TaskState.UNKNOWN.toString());
             } else {
-                statusResource.setState(status.getExecutionState().toString());
+                statusResource.setState(status.getState().toString());
             }
             statusResource.save();
             return String.valueOf(statusResource.getStatusId());
@@ -601,11 +594,11 @@ public class ExperimentRegistry {
             statusResource.setTaskId(taskId);
             statusResource.setStatusType(StatusType.TASK.toString());
             statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            statusResource.setState(status.getExecutionState().toString());
+            statusResource.setState(status.getState().toString());
             statusResource.save();
-            logger.infoId(taskId, "Updated task {} status to {}.", taskId, status.toString());
+            logger.info(taskId, "Updated task {} status to {}.", taskId, status.toString());
         } catch (Exception e) {
-            logger.errorId(taskId, "Error while updating task status to " + status.toString() + "...", e);
+            logger.error(taskId, "Error while updating task status to " + status.toString() + "...", e);
             throw new RegistryException(e);
         }
     }
@@ -656,234 +649,229 @@ public class ExperimentRegistry {
             statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
             statusResource.setState(status.getJobState().toString());
             statusResource.save();
-            logger.infoId(ids.toString(), "Updated job status to {}", status.toString());
-            return String.valueOf(statusResource.getStatusId());
-        } catch (Exception e) {
-            logger.errorId(ids.toString(), "Error while updating job status to " + status.toString() + " ...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * @param status application status
-     * @param ids    composite id will contain taskid and jobid
-     * @return status id
-     */
-    public String addApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
-            JobDetailResource jobDetail = taskDetail.getJobDetail((String) ids.getSecondLevelIdentifier());
-            StatusResource statusResource = (StatusResource) jobDetail.create(ResourceType.STATUS);
-            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
-            statusResource.setExperimentId(workflowNode.getExperimentId());
-            statusResource.setNodeId(workflowNode.getNodeInstanceId());
-            statusResource.setTaskId(taskDetail.getTaskId());
-            statusResource.setStatusType(StatusType.APPLICATION.toString());
-            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            if (status.getApplicationState() == null) {
-                statusResource.setState("UNKNOWN");
-            } else {
-                statusResource.setState(status.getApplicationState());
-            }
-            statusResource.save();
-            return String.valueOf(statusResource.getStatusId());
-        } catch (Exception e) {
-            logger.error("Unable to read airavata-server properties", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateApplicationStatus(ApplicationStatus status, String jobId) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
-            JobDetailResource jobDetail = taskDetail.getJobDetail(jobId);
-            StatusResource statusResource = jobDetail.getApplicationStatus();
-            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
-            statusResource.setExperimentId(workflowNode.getExperimentId());
-            statusResource.setNodeId(workflowNode.getNodeInstanceId());
-            statusResource.setTaskId(taskDetail.getTaskId());
-            statusResource.setStatusType(StatusType.APPLICATION.toString());
-            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            statusResource.setState(status.getApplicationState());
-            statusResource.save();
-        } catch (Exception e) {
-            logger.error("Error while updating application status...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-
-    /**
-     * @param status data transfer status
-     * @param ids    contains taskId and transfer id
-     * @return status id
-     */
-    public String addTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
-            DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail((String) ids.getSecondLevelIdentifier());
-            StatusResource statusResource = (StatusResource) dataTransferDetail.create(ResourceType.STATUS);
-            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
-            statusResource.setExperimentId(workflowNode.getExperimentId());
-            statusResource.setNodeId(workflowNode.getNodeInstanceId());
-            statusResource.setTaskId(taskDetail.getTaskId());
-            statusResource.setTransferId(dataTransferDetail.getTransferId());
-            statusResource.setStatusType(StatusType.DATA_TRANSFER.toString());
-            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            if (status.getTransferState() == null) {
-                statusResource.setState(TransferState.UNKNOWN.toString());
-            } else {
-                statusResource.setState(status.getTransferState().toString());
-            }
-            statusResource.save();
+            logger.info(ids.toString(), "Updated job status to {}", status.toString());
             return String.valueOf(statusResource.getStatusId());
         } catch (Exception e) {
-            logger.error("Error while adding transfer status...", e);
+            logger.error(ids.toString(), "Error while updating job status to " + status.toString() + " ...", e);
             throw new RegistryException(e);
         }
     }
 
-    public void updateTransferStatus(TransferStatus status, String transferId) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
-            DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail(transferId);
-            StatusResource statusResource = dataTransferDetail.getDataTransferStatus();
+//    /**
+//     * @param status application status
+//     * @param ids    composite id will contain taskid and jobid
+//     * @return status id
+//     */
+//    public String addApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
+//            JobDetailResource jobDetail = taskDetail.getJobDetail((String) ids.getSecondLevelIdentifier());
+//            StatusResource statusResource = (StatusResource) jobDetail.create(ResourceType.STATUS);
+//            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
+//            statusResource.setExperimentId(workflowNode.getExperimentId());
+//            statusResource.setNodeId(workflowNode.getNodeInstanceId());
+//            statusResource.setTaskId(taskDetail.getTaskId());
+//            statusResource.setStatusType(StatusType.APPLICATION.toString());
+//            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
+//            if (status.getApplicationState() == null) {
+//                statusResource.setState("UNKNOWN");
+//            } else {
+//                statusResource.setState(status.getApplicationState());
+//            }
+//            statusResource.save();
+//            return String.valueOf(statusResource.getStatusId());
+//        } catch (Exception e) {
+//            logger.error("Unable to read airavata-server properties", e);
+//            throw new RegistryException(e);
+//        }
+//    }
+//
+//    public void updateApplicationStatus(ApplicationStatus status, String jobId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
+//            JobDetailResource jobDetail = taskDetail.getJobDetail(jobId);
+//            StatusResource statusResource = jobDetail.getApplicationStatus();
+//            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
+//            statusResource.setExperimentId(workflowNode.getExperimentId());
+//            statusResource.setNodeId(workflowNode.getNodeInstanceId());
+//            statusResource.setTaskId(taskDetail.getTaskId());
+//            statusResource.setStatusType(StatusType.APPLICATION.toString());
+//            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
+//            statusResource.setState(status.getApplicationState());
+//            statusResource.save();
+//        } catch (Exception e) {
+//            logger.error("Error while updating application status...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
 
-            String taskId = dataTransferDetail.getTaskId();
-            taskDetail = workflowNode.getTaskDetail(taskId);
-            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
-            if (workflowNode != null) {
-                statusResource.setExperimentId(workflowNode.getExperimentId());
-                statusResource.setNodeId(workflowNode.getNodeInstanceId());
-            }
-            statusResource.setTaskId(taskId);
-            statusResource.setTransferId(transferId);
-            statusResource.setStatusType(StatusType.DATA_TRANSFER.toString());
-            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
-            statusResource.setState(status.getTransferState().toString());
-            statusResource.save();
-        } catch (Exception e) {
-            logger.error("Error while updating transfer status...", e);
-            throw new RegistryException(e);
-        }
-    }
 
-    public String addWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String expId) throws RegistryException {
-        try {
-            ExperimentResource experiment = gatewayResource.getExperiment(expId);
-            WorkflowNodeDetailResource resource = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            resource.setExperimentId(expId);
-            resource.setNodeName(nodeDetails.getNodeName());
-            resource.setExecutionUnit(nodeDetails.getExecutionUnit().toString());
-            resource.setExecutionUnitData(nodeDetails.getExecutionUnitData());
-            resource.setCreationTime(AiravataUtils.getTime(nodeDetails.getCreationTime()));
-            resource.setNodeInstanceId(getNodeInstanceID(nodeDetails.getNodeName()));
-            resource.save();
-            String nodeId = resource.getNodeInstanceId();
-            List<InputDataObjectType> nodeInputs = nodeDetails.getNodeInputs();
-            if (nodeInputs != null) {
-                addWorkflowInputs(nodeDetails.getNodeInputs(), resource);
-            }
-            List<OutputDataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
-            if (nodeOutputs != null && !nodeOutputs.isEmpty()) {
-                CompositeIdentifier ids = new CompositeIdentifier(expId, nodeId);
-                addNodeOutputs(nodeOutputs, ids);
-            }
-            WorkflowNodeStatus workflowNodeStatus = nodeDetails.getWorkflowNodeStatus();
-            CompositeIdentifier ids = new CompositeIdentifier(expId, nodeId);
-            if (workflowNodeStatus == null) {
-                workflowNodeStatus = new WorkflowNodeStatus();
-            }
-//                if (workflowNodeStatus.getWorkflowNodeState() != null){
-//                    WorkflowNodeStatus status = getWorkflowNodeStatus(nodeId);
-//                    if (status != null){
-//                        updateWorkflowNodeStatus(workflowNodeStatus, nodeId);
-//                    }else {
-//                        addWorkflowNodeStatus(workflowNodeStatus,ids);
-//                    }
-//                }else {
-//                    workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.UNKNOWN);
+//    public String addTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
+//            DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail((String) ids.getSecondLevelIdentifier());
+//            StatusResource statusResource = (StatusResource) dataTransferDetail.create(ResourceType.STATUS);
+//            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
+//            statusResource.setExperimentId(workflowNode.getExperimentId());
+//            statusResource.setNodeId(workflowNode.getNodeInstanceId());
+//            statusResource.setTaskId(taskDetail.getTaskId());
+//            statusResource.setTransferId(dataTransferDetail.getTransferId());
+//            statusResource.setStatusType(StatusType.DATA_TRANSFER.toString());
+//            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
+//            if (status.getTransferState() == null) {
+//                statusResource.setState(TransferState.UNKNOWN.toString());
+//            } else {
+//                statusResource.setState(status.getTransferState().toString());
+//            }
+//            statusResource.save();
+//            return String.valueOf(statusResource.getStatusId());
+//        } catch (Exception e) {
+//            logger.error("Error while adding transfer status...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
+//
+//    public void updateTransferStatus(TransferStatus status, String transferId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
+//            DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail(transferId);
+//            StatusResource statusResource = dataTransferDetail.getDataTransferStatus();
+//
+//            String taskId = dataTransferDetail.getTaskId();
+//            taskDetail = workflowNode.getTaskDetail(taskId);
+//            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
+//            if (workflowNode != null) {
+//                statusResource.setExperimentId(workflowNode.getExperimentId());
+//                statusResource.setNodeId(workflowNode.getNodeInstanceId());
+//            }
+//            statusResource.setTaskId(taskId);
+//            statusResource.setTransferId(transferId);
+//            statusResource.setStatusType(StatusType.DATA_TRANSFER.toString());
+//            statusResource.setStatusUpdateTime(AiravataUtils.getTime(status.getTimeOfStateChange()));
+//            statusResource.setState(status.getTransferState().toString());
+//            statusResource.save();
+//        } catch (Exception e) {
+//            logger.error("Error while updating transfer status...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
+//
+//    public String addWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String expId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = gatewayResource.getExperiment(expId);
+//            WorkflowNodeDetailResource resource = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            resource.setExperimentId(expId);
+//            resource.setNodeName(nodeDetails.getNodeName());
+//            resource.setExecutionUnit(nodeDetails.getExecutionUnit().toString());
+//            resource.setExecutionUnitData(nodeDetails.getExecutionUnitData());
+//            resource.setCreationTime(AiravataUtils.getTime(nodeDetails.getCreationTime()));
+//            resource.setNodeInstanceId(getNodeInstanceID(nodeDetails.getNodeName()));
+//            resource.save();
+//            String nodeId = resource.getNodeInstanceId();
+//            List<InputDataObjectType> nodeInputs = nodeDetails.getNodeInputs();
+//            if (nodeInputs != null) {
+//                addWorkflowInputs(nodeDetails.getNodeInputs(), resource);
+//            }
+//            List<OutputDataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
+//            if (nodeOutputs != null && !nodeOutputs.isEmpty()) {
+//                CompositeIdentifier ids = new CompositeIdentifier(expId, nodeId);
+//                addNodeOutputs(nodeOutputs, ids);
+//            }
+//            WorkflowNodeStatus workflowNodeStatus = nodeDetails.getWorkflowNodeStatus();
+//            CompositeIdentifier ids = new CompositeIdentifier(expId, nodeId);
+//            if (workflowNodeStatus == null) {
+//                workflowNodeStatus = new WorkflowNodeStatus();
+//            }
+////                if (workflowNodeStatus.getWorkflowNodeState() != null){
+////                    WorkflowNodeStatus status = getWorkflowNodeStatus(nodeId);
+////                    if (status != null){
+////                        updateWorkflowNodeStatus(workflowNodeStatus, nodeId);
+////                    }else {
+////                        addWorkflowNodeStatus(workflowNodeStatus,ids);
+////                    }
+////                }else {
+////                    workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.UNKNOWN);
+////                    addWorkflowNodeStatus(workflowNodeStatus, ids);
+////                }
+//            workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.UNKNOWN);
+//            addWorkflowNodeStatus(workflowNodeStatus, ids);
+//            List<TaskDetails> taskDetails = nodeDetails.getTaskDetailsList();
+//            if (taskDetails != null && !taskDetails.isEmpty()) {
+//                for (TaskDetails task : taskDetails) {
+//                    addTaskDetails(task, nodeId);
+//                }
+//            }
+//            List<ErrorDetails> errors = nodeDetails.getErrors();
+//            if (errors != null && !errors.isEmpty()) {
+//                for (ErrorDetails error : errors) {
+//                    addErrorDetails(error, nodeId);
+//                }
+//            }
+//            return nodeId;
+//        } catch (Exception e) {
+//            logger.error("Error while adding workflow node details...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
+//
+//    public void updateWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String nodeId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode(nodeId);
+//            workflowNode.setNodeName(nodeDetails.getNodeName());
+//            workflowNode.setExecutionUnit(nodeDetails.getExecutionUnit().toString());
+//            workflowNode.setExecutionUnitData(nodeDetails.getExecutionUnitData());
+//            workflowNode.setCreationTime(AiravataUtils.getTime(nodeDetails.getCreationTime()));
+//            workflowNode.setNodeInstanceId(nodeId);
+//            workflowNode.save();
+//            String expID = workflowNode.getExperimentId();
+//            List<InputDataObjectType> nodeInputs = nodeDetails.getNodeInputs();
+//            if (nodeInputs != null) {
+//                updateWorkflowInputs(nodeDetails.getNodeInputs(), workflowNode);
+//            }
+//            List<OutputDataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
+//            if (nodeOutputs != null && !nodeOutputs.isEmpty()) {
+//                updateNodeOutputs(nodeOutputs, nodeId);
+//            }
+//            WorkflowNodeStatus workflowNodeStatus = nodeDetails.getWorkflowNodeStatus();
+//            if (workflowNodeStatus != null) {
+//                if (isWFNodeExist(nodeId)) {
+//                    updateWorkflowNodeStatus(workflowNodeStatus, nodeId);
+//                } else {
+//                    CompositeIdentifier ids = new CompositeIdentifier(expID, nodeId);
 //                    addWorkflowNodeStatus(workflowNodeStatus, ids);
 //                }
-            workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.UNKNOWN);
-            addWorkflowNodeStatus(workflowNodeStatus, ids);
-            List<TaskDetails> taskDetails = nodeDetails.getTaskDetailsList();
-            if (taskDetails != null && !taskDetails.isEmpty()) {
-                for (TaskDetails task : taskDetails) {
-                    addTaskDetails(task, nodeId);
-                }
-            }
-            List<ErrorDetails> errors = nodeDetails.getErrors();
-            if (errors != null && !errors.isEmpty()) {
-                for (ErrorDetails error : errors) {
-                    addErrorDetails(error, nodeId);
-                }
-            }
-            return nodeId;
-        } catch (Exception e) {
-            logger.error("Error while adding workflow node details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String nodeId) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode(nodeId);
-            workflowNode.setNodeName(nodeDetails.getNodeName());
-            workflowNode.setExecutionUnit(nodeDetails.getExecutionUnit().toString());
-            workflowNode.setExecutionUnitData(nodeDetails.getExecutionUnitData());
-            workflowNode.setCreationTime(AiravataUtils.getTime(nodeDetails.getCreationTime()));
-            workflowNode.setNodeInstanceId(nodeId);
-            workflowNode.save();
-            String expID = workflowNode.getExperimentId();
-            List<InputDataObjectType> nodeInputs = nodeDetails.getNodeInputs();
-            if (nodeInputs != null) {
-                updateWorkflowInputs(nodeDetails.getNodeInputs(), workflowNode);
-            }
-            List<OutputDataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
-            if (nodeOutputs != null && !nodeOutputs.isEmpty()) {
-                updateNodeOutputs(nodeOutputs, nodeId);
-            }
-            WorkflowNodeStatus workflowNodeStatus = nodeDetails.getWorkflowNodeStatus();
-            if (workflowNodeStatus != null) {
-                if (isWFNodeExist(nodeId)) {
-                    updateWorkflowNodeStatus(workflowNodeStatus, nodeId);
-                } else {
-                    CompositeIdentifier ids = new CompositeIdentifier(expID, nodeId);
-                    addWorkflowNodeStatus(workflowNodeStatus, ids);
-                }
-            }
-            List<TaskDetails> taskDetails = nodeDetails.getTaskDetailsList();
-            if (taskDetails != null && !taskDetails.isEmpty()) {
-                for (TaskDetails task : taskDetails) {
-                    String taskID = task.getTaskID();
-                    if (isTaskDetailExist(taskID)) {
-                        updateTaskDetails(task, taskID);
-                    } else {
-                        addTaskDetails(task, nodeId);
-                    }
-                }
-            }
-            List<ErrorDetails> errors = nodeDetails.getErrors();
-            if (errors != null && !errors.isEmpty()) {
-                for (ErrorDetails error : errors) {
-                    addErrorDetails(error, nodeId);
-                }
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating workflow node details...", e);
-            throw new RegistryException(e);
-        }
-    }
+//            }
+//            List<TaskDetails> taskDetails = nodeDetails.getTaskDetailsList();
+//            if (taskDetails != null && !taskDetails.isEmpty()) {
+//                for (TaskDetails task : taskDetails) {
+//                    String taskID = task.getTaskID();
+//                    if (isTaskDetailExist(taskID)) {
+//                        updateTaskDetails(task, taskID);
+//                    } else {
+//                        addTaskDetails(task, nodeId);
+//                    }
+//                }
+//            }
+//            List<ErrorDetails> errors = nodeDetails.getErrors();
+//            if (errors != null && !errors.isEmpty()) {
+//                for (ErrorDetails error : errors) {
+//                    addErrorDetails(error, nodeId);
+//                }
+//            }
+//        } catch (Exception e) {
+//            logger.error("Error while updating workflow node details...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
 
 
     public void addWorkflowInputs(List<InputDataObjectType> wfInputs, WorkflowNodeDetailResource nodeDetailResource) throws RegistryException {
@@ -899,207 +887,207 @@ public class ExperimentRegistry {
                 resource.setMetadata(input.getMetaData());
                 resource.setAppArgument(input.getApplicationArgument());
                 resource.setInputOrder(input.getInputOrder());
-                resource.setRequired(input.isIsRequired());
-                resource.setRequiredToCMD(input.isRequiredToAddedToCommandLine());
-                resource.save();
-            }
-        } catch (Exception e) {
-            logger.error("Error while adding workflow inputs...", e);
-            throw new RegistryException(e);
-        }
-
-    }
-
-    public void updateWorkflowInputs(List<InputDataObjectType> wfInputs, WorkflowNodeDetailResource nodeDetailResource) throws RegistryException {
-        try {
-            List<NodeInputResource> nodeInputs = nodeDetailResource.getNodeInputs();
-            for (InputDataObjectType input : wfInputs) {
-                for (NodeInputResource resource : nodeInputs) {
-                    resource.setNodeId(nodeDetailResource.getNodeInstanceId());
-                    resource.setInputKey(input.getName());
-                    resource.setValue(input.getValue());
-                    if (input.getType() != null) {
-                        resource.setDataType(input.getType().toString());
-                    }
-                    resource.setMetadata(input.getMetaData());
-                    resource.setAppArgument(input.getApplicationArgument());
-                    resource.setInputOrder(input.getInputOrder());
-                    resource.setRequired(input.isIsRequired());
-                    resource.setRequiredToCMD(input.isRequiredToAddedToCommandLine());
-                    resource.save();
-                }
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating workflow inputs...", e);
-            throw new RegistryException(e);
-        }
-
-    }
-
-    public String addTaskDetails(TaskDetails taskDetails, String nodeId) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode(nodeId);
-            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
-            taskDetail.setNodeId(nodeId);
-            taskDetail.setTaskId(getTaskID(workflowNode.getNodeName()));
-            taskDetail.setApplicationId(taskDetails.getApplicationId());
-            taskDetail.setApplicationVersion(taskDetails.getApplicationVersion());
-            taskDetail.setCreationTime(AiravataUtils.getTime(taskDetails.getCreationTime()));
-            taskDetail.setEnableEmailNotifications(taskDetails.isEnableEmailNotification());
-            taskDetail.save();
-
-            List<String> emailAddresses = taskDetails.getEmailAddresses();
-            if (emailAddresses != null && !emailAddresses.isEmpty()){
-                for (String email : emailAddresses){
-                    NotificationEmailResource emailResource = new NotificationEmailResource();
-                    emailResource.setExperimentId(workflowNode.getExperimentId());
-                    emailResource.setTaskId(taskDetail.getTaskId());
-                    emailResource.setEmailAddress(email);
-                    emailResource.save();
-                }
-            }
-
-            List<InputDataObjectType> applicationInputs = taskDetails.getApplicationInputs();
-            if (applicationInputs != null) {
-                addAppInputs(applicationInputs, taskDetail);
-            }
-            List<OutputDataObjectType> applicationOutput = taskDetails.getApplicationOutputs();
-            if (applicationOutput != null) {
-                addAppOutputs(applicationOutput, taskDetail);
-            }
-            ComputationalResourceScheduling taskScheduling = taskDetails.getTaskScheduling();
-            if (taskScheduling != null) {
-                addComputationScheduling(taskScheduling, taskDetail);
-            }
-            AdvancedInputDataHandling inputDataHandling = taskDetails.getAdvancedInputDataHandling();
-            if (inputDataHandling != null) {
-                addInputDataHandling(inputDataHandling, taskDetail);
-            }
-            AdvancedOutputDataHandling outputDataHandling = taskDetails.getAdvancedOutputDataHandling();
-            if (outputDataHandling != null) {
-                addOutputDataHandling(outputDataHandling, taskDetail);
-            }
-
-            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
-            if (jobDetailsList != null && !jobDetailsList.isEmpty()) {
-                for (JobDetails job : jobDetailsList) {
-                    CompositeIdentifier ids = new CompositeIdentifier(taskDetail.getTaskId(), job.getJobID());
-                    addJobDetails(job, ids);
-                }
-            }
-
-            List<DataTransferDetails> dataTransferDetailsList = taskDetails.getDataTransferDetailsList();
-            if (dataTransferDetailsList != null && !dataTransferDetailsList.isEmpty()) {
-                for (DataTransferDetails transferDetails : dataTransferDetailsList) {
-                    addDataTransferDetails(transferDetails, taskDetail.getTaskId());
-                }
-            }
-
-            List<ErrorDetails> errors = taskDetails.getErrors();
-            if (errors != null && !errors.isEmpty()) {
-                for (ErrorDetails error : errors) {
-                    addErrorDetails(error, taskDetail.getTaskId());
-                }
-            }
-
-            TaskStatus taskStatus = taskDetails.getTaskStatus();
-            CompositeIdentifier ids = new CompositeIdentifier(nodeId, taskDetail.getTaskId());
-            if (taskStatus != null) {
-                if (taskStatus.getExecutionState() != null) {
-                    addTaskStatus(taskStatus, ids);
-                } else {
-                    taskStatus.setExecutionState(TaskState.UNKNOWN);
-                    addTaskStatus(taskStatus, ids);
-                }
-            } else {
-                TaskStatus status = new TaskStatus();
-                status.setExecutionState(TaskState.UNKNOWN);
-                addTaskStatus(status, ids);
-            }
-            return taskDetail.getTaskId();
-        } catch (Exception e) {
-            logger.error("Error while adding task details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String updateTaskDetails(TaskDetails taskDetails, String taskId) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            TaskDetailResource taskDetail = workflowNode.getTaskDetail(taskId);
-//            taskDetail.setWorkflowNodeDetailResource(workflowNode);
-            taskDetail.setApplicationId(taskDetails.getApplicationId());
-            taskDetail.setApplicationVersion(taskDetails.getApplicationVersion());
-            taskDetail.setCreationTime(AiravataUtils.getTime(taskDetails.getCreationTime()));
-            taskDetail.setApplicationDeploymentId(taskDetails.getApplicationDeploymentId());
-            taskDetail.setEnableEmailNotifications(taskDetails.isEnableEmailNotification());
-            taskDetail.save();
-
-            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
-
-            List<String> emailAddresses = taskDetails.getEmailAddresses();
-            // remove existing emails
-            taskDetail.remove(ResourceType.NOTIFICATION_EMAIL, taskId);
-            if (emailAddresses != null && !emailAddresses.isEmpty()){
-                for (String email : emailAddresses){
-                    NotificationEmailResource emailResource = new NotificationEmailResource();
-                    emailResource.setExperimentId(workflowNode.getExperimentId());
-                    emailResource.setTaskId(taskId);
-                    emailResource.setEmailAddress(email);
-                    emailResource.save();
-                }
-            }
-            List<InputDataObjectType> applicationInputs = taskDetails.getApplicationInputs();
-            if (applicationInputs != null) {
-                updateAppInputs(applicationInputs, taskDetail);
-            }
-            ComputationalResourceScheduling taskScheduling = taskDetails.getTaskScheduling();
-            if (taskScheduling != null) {
-                updateSchedulingData(taskScheduling, taskDetail);
-            }
-            AdvancedInputDataHandling inputDataHandling = taskDetails.getAdvancedInputDataHandling();
-            if (inputDataHandling != null) {
-                updateInputDataHandling(inputDataHandling, taskDetail);
-            }
-            AdvancedOutputDataHandling outputDataHandling = taskDetails.getAdvancedOutputDataHandling();
-            if (outputDataHandling != null) {
-                updateOutputDataHandling(outputDataHandling, taskDetail);
-            }
-            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
-            if (jobDetailsList != null && !jobDetailsList.isEmpty()) {
-                for (JobDetails job : jobDetailsList) {
-                    CompositeIdentifier ids = new CompositeIdentifier(taskId, job.getJobID());
-                    updateJobDetails(job, ids);
-                }
+                resource.setRequired(input.isIsRequired());
+                resource.setRequiredToCMD(input.isRequiredToAddedToCommandLine());
+                resource.save();
             }
+        } catch (Exception e) {
+            logger.error("Error while adding workflow inputs...", e);
+            throw new RegistryException(e);
+        }
 
-            List<DataTransferDetails> dataTransferDetailsList = taskDetails.getDataTransferDetailsList();
-            if (dataTransferDetailsList != null && !dataTransferDetailsList.isEmpty()) {
-                for (DataTransferDetails transferDetails : dataTransferDetailsList) {
-                    updateDataTransferDetails(transferDetails, transferDetails.getTransferID());
-                }
-            }
+    }
 
-            List<ErrorDetails> errors = taskDetails.getErrors();
-            if (errors != null && !errors.isEmpty()) {
-                for (ErrorDetails error : errors) {
-                    addErrorDetails(error, taskDetail.getTaskId());
+    public void updateWorkflowInputs(List<InputDataObjectType> wfInputs, WorkflowNodeDetailResource nodeDetailResource) throws RegistryException {
+        try {
+            List<NodeInputResource> nodeInputs = nodeDetailResource.getNodeInputs();
+            for (InputDataObjectType input : wfInputs) {
+                for (NodeInputResource resource : nodeInputs) {
+                    resource.setNodeId(nodeDetailResource.getNodeInstanceId());
+                    resource.setInputKey(input.getName());
+                    resource.setValue(input.getValue());
+                    if (input.getType() != null) {
+                        resource.setDataType(input.getType().toString());
+                    }
+                    resource.setMetadata(input.getMetaData());
+                    resource.setAppArgument(input.getApplicationArgument());
+                    resource.setInputOrder(input.getInputOrder());
+                    resource.setRequired(input.isIsRequired());
+                    resource.setRequiredToCMD(input.isRequiredToAddedToCommandLine());
+                    resource.save();
                 }
             }
-
-            TaskStatus taskStatus = taskDetails.getTaskStatus();
-            if (taskStatus != null) {
-                updateTaskStatus(taskStatus, taskId);
-            }
-            return taskDetail.getTaskId();
         } catch (Exception e) {
-            logger.error("Error while updating task details...", e);
+            logger.error("Error while updating workflow inputs...", e);
             throw new RegistryException(e);
         }
+
     }
 
+//    public String addTaskDetails(TaskModel taskDetails, String nodeId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode(nodeId);
+//            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
+//            taskDetail.setNodeId(nodeId);
+//            taskDetail.setTaskId(getTaskID(workflowNode.getNodeName()));
+//            taskDetail.setApplicationId(taskDetails.getApplicationId());
+//            taskDetail.setApplicationVersion(taskDetails.getApplicationVersion());
+//            taskDetail.setCreationTime(AiravataUtils.getTime(taskDetails.getCreationTime()));
+//            taskDetail.setEnableEmailNotifications(taskDetails.isEnableEmailNotification());
+//            taskDetail.save();
+//
+//            List<String> emailAddresses = taskDetails.getEmailAddresses();
+//            if (emailAddresses != null && !emailAddresses.isEmpty()){
+//                for (String email : emailAddresses){
+//                    NotificationEmailResource emailResource = new NotificationEmailResource();
+//                    emailResource.setExperimentId(workflowNode.getExperimentId());
+//                    emailResource.setTaskId(taskDetail.getTaskId());
+//                    emailResource.setEmailAddress(email);
+//                    emailResource.save();
+//                }
+//            }
+//
+//            List<InputDataObjectType> applicationInputs = taskDetails.getApplicationInputs();
+//            if (applicationInputs != null) {
+//                addAppInputs(applicationInputs, taskDetail);
+//            }
+//            List<OutputDataObjectType> applicationOutput = taskDetails.getApplicationOutputs();
+//            if (applicationOutput != null) {
+//                addAppOutputs(applicationOutput, taskDetail);
+//            }
+//            ComputationalResourceSchedulingModel taskScheduling = taskDetails.getTaskScheduling();
+//            if (taskScheduling != null) {
+//                addComputationScheduling(taskScheduling, taskDetail);
+//            }
+////            AdvancedInputDataHandling inputDataHandling = taskDetails.getAdvancedInputDataHandling();
+////            if (inputDataHandling != null) {
+////                addInputDataHandling(inputDataHandling, taskDetail);
+////            }
+////            AdvancedOutputDataHandling outputDataHandling = taskDetails.getAdvancedOutputDataHandling();
+////            if (outputDataHandling != null) {
+////                addOutputDataHandling(outputDataHandling, taskDetail);
+////            }
+//
+//            List<JobModel> jobDetailsList = taskDetails.getJobDetailsList();
+//            if (jobDetailsList != null && !jobDetailsList.isEmpty()) {
+//                for (JobDetails job : jobDetailsList) {
+//                    CompositeIdentifier ids = new CompositeIdentifier(taskDetail.getTaskId(), job.getJobID());
+//                    addJobDetails(job, ids);
+//                }
+//            }
+//
+//            List<DataTransferDetails> dataTransferDetailsList = taskDetails.getDataTransferDetailsList();
+//            if (dataTransferDetailsList != null && !dataTransferDetailsList.isEmpty()) {
+//                for (DataTransferDetails transferDetails : dataTransferDetailsList) {
+//                    addDataTransferDetails(transferDetails, taskDetail.getTaskId());
+//                }
+//            }
+//
+//            List<ErrorDetails> errors = taskDetails.getErrors();
+//            if (errors != null && !errors.isEmpty()) {
+//                for (ErrorDetails error : errors) {
+//                    addErrorDetails(error, taskDetail.getTaskId());
+//                }
+//            }
+//
+//            TaskStatus taskStatus = taskDetails.getTaskStatus();
+//            CompositeIdentifier ids = new CompositeIdentifier(nodeId, taskDetail.getTaskId());
+//            if (taskStatus != null) {
+//                if (taskStatus.getExecutionState() != null) {
+//                    addTaskStatus(taskStatus, ids);
+//                } else {
+//                    taskStatus.setExecutionState(TaskState.UNKNOWN);
+//                    addTaskStatus(taskStatus, ids);
+//                }
+//            } else {
+//                TaskStatus status = new TaskStatus();
+//                status.setExecutionState(TaskState.UNKNOWN);
+//                addTaskStatus(status, ids);
+//            }
+//            return taskDetail.getTaskId();
+//        } catch (Exception e) {
+//            logger.error("Error while adding task details...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
+
+//    public String updateTaskDetails(TaskModel taskDetails, String taskId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            TaskDetailResource taskDetail = workflowNode.getTaskDetail(taskId);
+////            taskDetail.setWorkflowNodeDetailResource(workflowNode);
+//            taskDetail.setApplicationId(taskDetails.getApplicationId());
+//            taskDetail.setApplicationVersion(taskDetails.getApplicationVersion());
+//            taskDetail.setCreationTime(AiravataUtils.getTime(taskDetails.getCreationTime()));
+//            taskDetail.setApplicationDeploymentId(taskDetails.getApplicationDeploymentId());
+//            taskDetail.setEnableEmailNotifications(taskDetails.isEnableEmailNotification());
+//            taskDetail.save();
+//
+//            workflowNode = experiment.getWorkflowNode(taskDetail.getNodeId());
+//
+//            List<String> emailAddresses = taskDetails.getEmailAddresses();
+//            // remove existing emails
+//            taskDetail.remove(ResourceType.NOTIFICATION_EMAIL, taskId);
+//            if (emailAddresses != null && !emailAddresses.isEmpty()){
+//                for (String email : emailAddresses){
+//                    NotificationEmailResource emailResource = new NotificationEmailResource();
+//                    emailResource.setExperimentId(workflowNode.getExperimentId());
+//                    emailResource.setTaskId(taskId);
+//                    emailResource.setEmailAddress(email);
+//                    emailResource.save();
+//                }
+//            }
+//            List<InputDataObjectType> applicationInputs = taskDetails.getApplicationInputs();
+//            if (applicationInputs != null) {
+//                updateAppInputs(applicationInputs, taskDetail);
+//            }
+//            ComputationalResourceScheduling taskScheduling = taskDetails.getTaskScheduling();
+//            if (taskScheduling != null) {
+//                updateSchedulingData(taskScheduling, taskDetail);
+//            }
+//            AdvancedInputDataHandling inputDataHandling = taskDetails.getAdvancedInputDataHandling();
+//            if (inputDataHandling != null) {
+//                updateInputDataHandling(inputDataHandling, taskDetail);
+//            }
+//            AdvancedOutputDataHandling outputDataHandling = taskDetails.getAdvancedOutputDataHandling();
+//            if (outputDataHandling != null) {
+//                updateOutputDataHandling(outputDataHandling, taskDetail);
+//            }
+//            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
+//            if (jobDetailsList != null && !jobDetailsList.isEmpty()) {
+//                for (JobDetails job : jobDetailsList) {
+//                    CompositeIdentifier ids = new CompositeIdentifier(taskId, job.getJobID());
+//                    updateJobDetails(job, ids);
+//                }
+//            }
+//
+//            List<DataTransferDetails> dataTransferDetailsList = taskDetails.getDataTransferDetailsList();
+//            if (dataTransferDetailsList != null && !dataTransferDetailsList.isEmpty()) {
+//                for (DataTransferDetails transferDetails : dataTransferDetailsList) {
+//                    updateDataTransferDetails(transferDetails, transferDetails.getTransferID());
+//                }
+//            }
+//
+//            List<ErrorDetails> errors = taskDetails.getErrors();
+//            if (errors != null && !errors.isEmpty()) {
+//                for (ErrorDetails error : errors) {
+//                    addErrorDetails(error, taskDetail.getTaskId());
+//                }
+//            }
+//
+//            TaskStatus taskStatus = taskDetails.getTaskStatus();
+//            if (taskStatus != null) {
+//                updateTaskStatus(taskStatus, taskId);
+//            }
+//            return taskDetail.getTaskId();
+//        } catch (Exception e) {
+//            logger.error("Error while updating task details...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
+
     public void addAppInputs(List<InputDataObjectType> appInputs, TaskDetailResource taskDetailResource) throws RegistryException {
         try {
             for (InputDataObjectType input : appInputs) {
@@ -1206,7 +1194,7 @@ public class ExperimentRegistry {
 
     }
 
-    public String addJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
+    public String addJobDetails(JobModel jobDetails, CompositeIdentifier ids) throws RegistryException {
         try {
             ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
             WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
@@ -1228,21 +1216,21 @@ public class ExperimentRegistry {
                     addJobStatus(jobStatus, ids);
                 }
             }
-            ApplicationStatus applicationStatus = jobDetails.getApplicationStatus();
+            JobStatus applicationStatus = jobDetails.getJobStatus();
             if (applicationStatus != null) {
-                ApplicationStatus appStatus = getApplicationStatus(ids);
+                JobStatus appStatus = getJobStatus(ids);
                 if (appStatus != null) {
-                    updateApplicationStatus(applicationStatus, (String) ids.getSecondLevelIdentifier());
+                    updateJobStatus(applicationStatus, ids);
                 } else {
-                    addApplicationStatus(applicationStatus, ids);
-                }
-            }
-            List<ErrorDetails> errors = jobDetails.getErrors();
-            if (errors != null && !errors.isEmpty()) {
-                for (ErrorDetails error : errors) {
-                    addErrorDetails(error, ids.getSecondLevelIdentifier());
+                    addJobStatus(applicationStatus, ids);
                 }
             }
+//            List<ErrorModel> errors = jobDetails.getErrors();
+//            if (errors != null && !errors.isEmpty()) {
+//                for (ErrorDetails error : errors) {
+//                    addErrorDetails(error, ids.getSecondLevelIdentifier());
+//                }
+//            }
             return jobDetail.getJobId();
         } catch (Exception e) {
             logger.error("Error while adding job details...", e);
@@ -1251,7 +1239,7 @@ public class ExperimentRegistry {
     }
 
     // ids - taskId + jobid
-    public void updateJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
+    public void updateJobDetails(JobModel jobDetails, CompositeIdentifier ids) throws RegistryException {
         try {
             ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
             WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
@@ -1275,94 +1263,94 @@ public class ExperimentRegistry {
                     addJobStatus(jobStatus, ids);
                 }
             }
-            ApplicationStatus applicationStatus = jobDetails.getApplicationStatus();
+            JobStatus applicationStatus = jobDetails.getJobStatus();
             if (applicationStatus != null) {
-                ApplicationStatus appStatus = getApplicationStatus(ids);
+                JobStatus appStatus = getJobStatus(ids);
                 if (appStatus != null) {
-                    updateApplicationStatus(applicationStatus, jobId);
+                    updateJobStatus(applicationStatus, ids);
                 } else {
-                    addApplicationStatus(applicationStatus, ids);
-                }
-            }
-            List<ErrorDetails> errors = jobDetails.getErrors();
-            if (errors != null && !errors.isEmpty()) {
-                for (ErrorDetails error : errors) {
-                    addErrorDetails(error, jobId);
+                    addJobStatus(applicationStatus, ids);
                 }
             }
+//            List<ErrorDetails> errors = jobDetails.getErrors();
+//            if (errors != null && !errors.isEmpty()) {
+//                for (ErrorDetails error : errors) {
+//                    addErrorDetails(error, jobId);
+//                }
+//            }
         } catch (Exception e) {
             logger.error("Error while updating job details...", e);
             throw new RegistryException(e);
         }
     }
 
-    public String addDataTransferDetails(DataTransferDetails transferDetails, String taskId) throws RegistryException {
-        try {
-            if (transferDetails.getTransferDescription() == null){
-                throw new RegistryException("Data transfer description cannot be empty");
-            }
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            TaskDetailResource taskDetail = workflowNode.getTaskDetail(taskId);
-            DataTransferDetailResource resource = (DataTransferDetailResource) taskDetail.create(ResourceType.DATA_TRANSFER_DETAIL);
-            resource.setTaskId(taskId);
-            resource.setTransferId(getDataTransferID(taskId));
-
-            resource.setTransferDescription(transferDetails.getTransferDescription());
-            resource.setCreationTime(AiravataUtils.getTime(transferDetails.getCreationTime()));
-            resource.save();
-            String transferId = resource.getTransferId();
-            TransferStatus transferStatus = transferDetails.getTransferStatus();
-            if (transferStatus != null) {
-                TransferStatus status = getDataTransferStatus(transferId);
-                if (status != null) {
-                    updateTransferStatus(transferStatus, transferId);
-                } else {
-                    CompositeIdentifier ids = new CompositeIdentifier(taskId, transferId);
-                    addTransferStatus(transferStatus, ids);
-                }
-            }
-            return resource.getTransferId();
-        } catch (Exception e) {
-            logger.error("Error while adding transfer details...", e);
-            throw new RegistryException(e);
-        }
-    }
+//    public String addDataTransferDetails(DataTransferDetails transferDetails, String taskId) throws RegistryException {
+//        try {
+//            if (transferDetails.getTransferDescription() == null){
+//                throw new RegistryException("Data transfer description cannot be empty");
+//            }
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            TaskDetailResource taskDetail = workflowNode.getTaskDetail(taskId);
+//            DataTransferDetailResource resource = (DataTransferDetailResource) taskDetail.create(ResourceType.DATA_TRANSFER_DETAIL);
+//            resource.setTaskId(taskId);
+//            resource.setTransferId(getDataTransferID(taskId));
+//
+//            resource.setTransferDescription(transferDetails.getTransferDescription());
+//            resource.setCreationTime(AiravataUtils.getTime(transferDetails.getCreationTime()));
+//            resource.save();
+//            String transferId = resource.getTransferId();
+//            TransferStatus transferStatus = transferDetails.getTransferStatus();
+//            if (transferStatus != null) {
+//                TransferStatus status = getDataTransferStatus(transferId);
+//                if (status != null) {
+//                    updateTransferStatus(transferStatus, transferId);
+//                } else {
+//                    CompositeIdentifier ids = new CompositeIdentifier(taskId, transferId);
+//                    addTransferStatus(transferStatus, ids);
+//                }
+//            }
+//            return resource.getTransferId();
+//        } catch (Exception e) {
+//            logger.error("Error while adding transfer details...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
 
-    public String updateDataTransferDetails(DataTransferDetails transferDetails, String transferId) throws RegistryException {
-        try {
-            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
-            DataTransferDetailResource resource = taskDetail.getDataTransferDetail(transferId);
-//            resource.setTaskDetailResource(taskDetail);
-            resource.setTransferDescription(transferDetails.getTransferDescription());
-            resource.setCreationTime(AiravataUtils.getTime(transferDetails.getCreationTime()));
-            resource.save();
-            String taskId = resource.getTaskId();
-            TransferStatus transferStatus = transferDetails.getTransferStatus();
-            if (transferStatus != null) {
-                TransferStatus status = getDataTransferStatus(transferId);
-                if (status != null) {
-                    updateTransferStatus(transferStatus, transferId);
-                } else {
-                    CompositeIdentifier ids = new CompositeIdentifier(taskId, transferId);
-                    addTransferStatus(transferStatus, ids);
-                }
-            }
-            return resource.getTransferId();
-        } catch (Exception e) {
-            logger.error("Error while updating transfer details...", e);
-            throw new RegistryException(e);
-        }
-    }
+//    public String updateDataTransferDetails(DataTransferDetails transferDetails, String transferId) throws RegistryException {
+//        try {
+//            ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//            WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+//            TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
+//            DataTransferDetailResource resource = taskDetail.getDataTransferDetail(transferId);
+////            resource.setTaskDetailResource(taskDetail);
+//            resource.setTransferDescription(transferDetails.getTransferDescription());
+//            resource.setCreationTime(AiravataUtils.getTime(transferDetails.getCreationTime()));
+//            resource.save();
+//            String taskId = resource.getTaskId();
+//            TransferStatus transferStatus = transferDetails.getTransferStatus();
+//            if (transferStatus != null) {
+//                TransferStatus status = getDataTransferStatus(transferId);
+//                if (status != null) {
+//                    updateTransferStatus(transferStatus, transferId);
+//                } else {
+//                    CompositeIdentifier ids = new CompositeIdentifier(taskId, transferId);
+//                    addTransferStatus(transferStatus, ids);
+//                }
+//            }
+//            return resource.getTransferId();
+//        } catch (Exception e) {
+//            logger.error("Error while updating transfer details...", e);
+//            throw new RegistryException(e);
+//        }
+//    }
 
     /**
      * @param scheduling computational resource object
      * @param ids        contains expId and taskId, if it is an experiment, task id can be null
      * @return scheduling id
      */
-    public String addComputationalResourceScheduling(ComputationalResourceScheduling scheduling, CompositeIdentifier ids) throws RegistryException {
+    public String addComputationalResourceScheduling(ComputationalResourceSchedulingModel scheduling, CompositeIdentifier ids) throws RegistryException {
         try {
             ExperimentResource experiment = gatewayResource.getExperiment((String) ids.getTopLevelIdentifier());
             ComputationSchedulingResource schedulingResource = (ComputationSchedulingResource) experiment.create(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING);
@@ -1378,9 +1366,8 @@ public class ExperimentRegistry {
             schedulingResource.setNumberOfThreads(scheduling.getNumberOfThreads());
             schedulingResource.setQueueName(scheduling.getQueueName());
             schedulingResource.setWalltimeLimit(scheduling.getWallTimeLimit());
-            schedulingResource.setJobStartTime(AiravataUtils.getTime(scheduling.getJobStartTime()));
             schedulingResource.setPhysicalMemory(scheduling.getTotalPhysicalMemory());
-            schedulingResource.setProjectName(scheduling.getComputationalProjectAccount());
+            schedulingResource.setChessisName(scheduling.getChessisNumber());
             schedulingResource.save();
             return String.valueOf(schedulingResource.getSchedulingId());
         } catch (Exception e) {
@@ -1389,79 +1376,79 @@ public class ExperimentRegistry {
         }
     }
 
-    /**
-     * @param dataHandling advanced

<TRUNCATED>

Mime
View raw message