Package org.apache.airavata.persistance.registry.jpa.model

Examples of org.apache.airavata.persistance.registry.jpa.model.ErrorDetail


    public void save() throws RegistryException{
        EntityManager em = null;
        try {
            em = ResourceUtils.getEntityManager();
            em.getTransaction().begin();
            ErrorDetail errorDetail = new ErrorDetail();
            errorDetail.setErrorID(errorId);
            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
            errorDetail.setExperiment(experiment);
            errorDetail.setExpId(experimentResource.getExpID());
            if (taskDetailResource != null) {
                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
                errorDetail.setTask(taskDetail);
                errorDetail.setTaskId(taskDetail.getTaskId());
            }

            if (nodeDetail != null) {
                WorkflowNodeDetail workflowNodeDetail = em.find(WorkflowNodeDetail.class, nodeDetail.getNodeInstanceId());
                errorDetail.setNodeDetails(workflowNodeDetail);
                errorDetail.setNodeId(workflowNodeDetail.getNodeId());
            }
            errorDetail.setCreationTime(creationTime);
            errorDetail.setActualErrorMsg(actualErrorMsg.toCharArray());
            errorDetail.setUserFriendlyErrorMsg(userFriendlyErrorMsg);
            errorDetail.setTransientPersistent(transientPersistent);
            errorDetail.setErrorCategory(errorCategory);
            errorDetail.setCorrectiveAction(correctiveAction);
            errorDetail.setActionableGroup(actionableGroup);
            errorDetail.setJobId(jobId);
            em.persist(errorDetail);
            errorId = errorDetail.getErrorID();
            em.getTransaction().commit();
            em.close();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new RegistryException(e);
View Full Code Here

TOP

Related Classes of org.apache.airavata.persistance.registry.jpa.model.ErrorDetail

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.