Package org.apache.airavata.registry.api.impl

Examples of org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl


    }
    try{
            WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
            WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
            workflowInstance.setTemplateName(resource.getTemplateName());
            WorkflowExecutionData workflowInstanceData = new WorkflowExecutionDataImpl(null, workflowInstance, new WorkflowExecutionStatus(workflowInstance, resource.getStatus()==null? null:State.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
            List<NodeDataResource> nodeData = resource.getNodeData();
            for (NodeDataResource nodeDataResource : nodeData) {
                workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId, nodeDataResource.getNodeID()));
            }
            return workflowInstanceData;
        } catch (ExperimentLazyLoadedException e) {
            throw new RegistryException(e);
        }
View Full Code Here


    @Path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOWINSTANCEDATA)
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getWorkflowInstanceData(@QueryParam("workflowInstanceId") String workflowInstanceId) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            WorkflowExecutionDataImpl workflowInstanceData = (WorkflowExecutionDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
            if (workflowInstanceData != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(workflowInstanceData);
                return builder.build();
            } else {
View Full Code Here

            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }

        WorkflowExecutionDataImpl workflowInstanceData = response.getEntity(WorkflowExecutionDataImpl.class);
        return workflowInstanceData;
    }
View Full Code Here

            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }

        WorkflowExecutionDataImpl workflowInstanceData = response.getEntity(WorkflowExecutionDataImpl.class);
        return workflowInstanceData;
    }
View Full Code Here

    @Path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOWINSTANCEDATA)
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getWorkflowInstanceData(@QueryParam("workflowInstanceId") String workflowInstanceId) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            WorkflowExecutionDataImpl workflowInstanceData = (WorkflowExecutionDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
            if (workflowInstanceData != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(workflowInstanceData);
                return builder.build();
            } else {
View Full Code Here

    }

    private void fillWorkflowInstanceData (ExperimentData experimentData,
                                                           ResultSet rs,
                                                           List<WorkflowExecution> workflowInstances) throws SQLException, ExperimentLazyLoadedException, ParseException {
        WorkflowExecutionDataImpl workflowInstanceData = (WorkflowExecutionDataImpl)experimentData.getWorkflowExecutionData(rs.getString(5));
        if (workflowInstanceData == null){
            WorkflowExecution workflowInstance = new WorkflowExecution(experimentData.getExperimentId(), rs.getString(5));
            workflowInstance.setTemplateName(rs.getString(6));
            workflowInstance.setExperimentId(rs.getString(1));
            workflowInstance.setWorkflowExecutionId(rs.getString(5));
            workflowInstances.add(workflowInstance);
            Date lastUpdateDate = getTime(rs.getString(9));
            String wdStatus = rs.getString(7);
            workflowInstanceData = new WorkflowExecutionDataImpl(null,
                    workflowInstance, new WorkflowExecutionStatus(workflowInstance,
                    createExecutionStatus(wdStatus),lastUpdateDate), null);
            workflowInstanceData.setExperimentData((ExperimentDataImpl)experimentData);
            experimentData.getWorkflowExecutionDataList().add(workflowInstanceData);
        }
        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowInstanceData.getWorkflowExecution(), rs.getString(10));
        NodeExecutionData workflowInstanceNodeData = new NodeExecutionData(workflowInstanceNode);

        String inputData = getStringValue(11, rs);
        String outputData = getStringValue(12, rs);

        workflowInstanceNodeData.setInput(inputData);
        workflowInstanceNodeData.setOutput(outputData);
        workflowInstanceNodeData.setStatus(createExecutionStatus(rs.getString(16)), getTime(rs.getString(18)));
        workflowInstanceNodeData.setType(WorkflowNodeType.getType(rs.getString(15)).getNodeType());
        workflowInstanceData.getNodeDataList().add(workflowInstanceNodeData);
    }
View Full Code Here

    }
    try{
            WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
            WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
            workflowInstance.setTemplateName(resource.getTemplateName());
            WorkflowExecutionData workflowInstanceData = new WorkflowExecutionDataImpl(null, workflowInstance, new WorkflowExecutionStatus(workflowInstance, resource.getStatus()==null? null:State.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
            List<NodeDataResource> nodeData = resource.getNodeData();
            for (NodeDataResource nodeDataResource : nodeData) {
                workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId, nodeDataResource.getNodeID()));
            }
            return workflowInstanceData;
        } catch (ExperimentLazyLoadedException e) {
            throw new RegistryException(e);
        }
View Full Code Here

    }

    private void fillWorkflowInstanceData (ExperimentData experimentData,
                                                           ResultSet rs,
                                                           List<WorkflowExecution> workflowInstances) throws SQLException, ExperimentLazyLoadedException, ParseException {
        WorkflowExecutionDataImpl workflowInstanceData = (WorkflowExecutionDataImpl)experimentData.getWorkflowExecutionData(rs.getString(5));
        if (workflowInstanceData == null){
            WorkflowExecution workflowInstance = new WorkflowExecution(experimentData.getExperimentId(), rs.getString(5));
            workflowInstance.setTemplateName(rs.getString(6));
            workflowInstance.setExperimentId(rs.getString(1));
            workflowInstance.setWorkflowExecutionId(rs.getString(5));
            workflowInstances.add(workflowInstance);
            Date lastUpdateDate = getTime(rs.getString(9));
            String wdStatus = rs.getString(7);
            workflowInstanceData = new WorkflowExecutionDataImpl(null,
                    workflowInstance, new WorkflowExecutionStatus(workflowInstance,
                    createExecutionStatus(wdStatus),lastUpdateDate), null);
            workflowInstanceData.setExperimentData((ExperimentDataImpl)experimentData);
            experimentData.getWorkflowExecutionDataList().add(workflowInstanceData);
        }
        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowInstanceData.getWorkflowExecution(), rs.getString(10));
        NodeExecutionData workflowInstanceNodeData = new NodeExecutionData(workflowInstanceNode);

        String inputData = getStringValue(11, rs);
        String outputData = getStringValue(12, rs);

        workflowInstanceNodeData.setInput(inputData);
        workflowInstanceNodeData.setOutput(outputData);
        workflowInstanceNodeData.setStatus(createExecutionStatus(rs.getString(16)), getTime(rs.getString(18)));
        workflowInstanceNodeData.setType(WorkflowNodeType.getType(rs.getString(15)).getNodeType());
        workflowInstanceData.getNodeDataList().add(workflowInstanceNodeData);
    }
View Full Code Here

    }

    private void fillWorkflowInstanceData (ExperimentData experimentData,
                                                           ResultSet rs,
                                                           List<WorkflowExecution> workflowInstances) throws SQLException, ExperimentLazyLoadedException, ParseException {
        WorkflowExecutionDataImpl workflowInstanceData = (WorkflowExecutionDataImpl)experimentData.getWorkflowExecutionData(rs.getString(5));
        if (workflowInstanceData == null){
            WorkflowExecution workflowInstance = new WorkflowExecution(experimentData.getExperimentId(), rs.getString(5));
            workflowInstance.setTemplateName(rs.getString(6));
            workflowInstance.setExperimentId(rs.getString(1));
            workflowInstance.setWorkflowExecutionId(rs.getString(5));
            workflowInstances.add(workflowInstance);
            Date lastUpdateDate = getTime(rs.getString(9));
            String wdStatus = rs.getString(7);
            workflowInstanceData = new WorkflowExecutionDataImpl(null,
                    workflowInstance, new WorkflowExecutionStatus(workflowInstance,
                    createExecutionStatus(wdStatus),lastUpdateDate), null);
            workflowInstanceData.setExperimentData((ExperimentDataImpl)experimentData);
            experimentData.getWorkflowExecutionDataList().add(workflowInstanceData);
        }
        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowInstanceData.getWorkflowExecution(), rs.getString(10));
        NodeExecutionData workflowInstanceNodeData = new NodeExecutionData(workflowInstanceNode);

        String inputData = getStringValue(11, rs);
        String outputData = getStringValue(12, rs);

        workflowInstanceNodeData.setInput(inputData);
        workflowInstanceNodeData.setOutput(outputData);
        workflowInstanceNodeData.setStatus(createExecutionStatus(rs.getString(16)), getTime(rs.getString(18)));
        workflowInstanceNodeData.setType(WorkflowNodeType.getType(rs.getString(15)).getNodeType());
        workflowInstanceData.getNodeDataList().add(workflowInstanceNodeData);
    }
View Full Code Here

    }
    try{
            WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
            WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
            workflowInstance.setTemplateName(resource.getTemplateName());
            WorkflowExecutionData workflowInstanceData = new WorkflowExecutionDataImpl(null, workflowInstance, new WorkflowExecutionStatus(workflowInstance, resource.getStatus()==null? null:State.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
            List<NodeDataResource> nodeData = resource.getNodeData();
            for (NodeDataResource nodeDataResource : nodeData) {
                workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId, nodeDataResource.getNodeID()));
            }
            return workflowInstanceData;
        } catch (ExperimentLazyLoadedException e) {
            throw new RegistryException(e);
        }
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl

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.