Examples of WorkflowDataResource


Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            return provenanceRegistry.getWorkflowExecutionTemplateName(workflowInstanceId);
        }
    if (!isWorkflowInstanceExists(workflowInstanceId, true)){
      throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
    }
    WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
    return wi.getTemplateName();
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.setWorkflowInstanceTemplateName(workflowInstanceId, templateName);
        }else {
            if (!isWorkflowInstanceExists(workflowInstanceId, true)){
                throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
            wi.setTemplateName(templateName);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.updateWorkflowInstanceStatus(instanceId, status);
        }else {
            if (!isWorkflowInstanceExists(instanceId, true)){
                throw new WorkflowInstanceDoesNotExistsException(instanceId);
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
            Timestamp currentTime = new Timestamp(Calendar.getInstance().getTime().getTime());
            wi.setStatus(status.toString());
            if (status==State.STARTED){
                wi.setStartTime(currentTime);
            }
            wi.setLastUpdatedTime(currentTime);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.updateWorkflowInstanceStatus(status);
        }else {
            if (!isWorkflowInstanceExists(status.getWorkflowInstance().getWorkflowExecutionId(), true)){
                throw new WorkflowInstanceDoesNotExistsException(status.getWorkflowInstance().getWorkflowExecutionId());
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(status.getWorkflowInstance().getWorkflowExecutionId());
            Timestamp currentTime = new Timestamp(status.getStatusUpdateTime().getTime());
            if(status.getExecutionStatus() != null){
                wi.setStatus(status.getExecutionStatus().toString());
            }

            if (status.getExecutionStatus()==State.STARTED){
                wi.setStartTime(currentTime);
            }
            wi.setLastUpdatedTime(currentTime);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            return provenanceRegistry.getWorkflowInstanceStatus(instanceId);
        }
        if (!isWorkflowInstanceExists(instanceId, true)){
      throw new WorkflowInstanceDoesNotExistsException(instanceId);
    }
    WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
    return new WorkflowExecutionStatus(new WorkflowExecution(wi.getExperimentID(),wi.getWorkflowInstanceID()),wi.getStatus()==null?null:State.valueOf(wi.getStatus()),wi.getLastUpdatedTime());
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.updateWorkflowNodeInput(node, data);
        }else {
            if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(),true)){
                throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
            NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
            nodeData.setInputs(data);
            nodeData.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

        }else {
            try {
                if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(),true)){
                    throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
                }
                WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
                NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
                nodeData.setOutputs(data);
                nodeData.save();
            } catch (RegistryException e) {
                e.printStackTrace();
                throw e;
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

        String id = workflowNode.getWorkflowInstance().getWorkflowExecutionId();
    String nodeId = workflowNode.getNodeId();
    if (!isWorkflowInstanceNodePresent(id, nodeId)){
      throw new WorkflowInstanceNodeDoesNotExistsException(id, nodeId);
    }
    WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(id);
    NodeDataResource nodeData = workflowInstance.getNodeData(nodeId);
    return new NodeExecutionStatus(new WorkflowInstanceNode(new WorkflowExecution(workflowInstance.getExperimentID(), workflowInstance.getWorkflowInstanceID()), nodeData.getNodeID()), nodeData.getStatus()==null?null:State.valueOf(nodeData.getStatus()),nodeData.getLastUpdateTime());
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

        String id = workflowNode.getWorkflowInstance().getWorkflowExecutionId();
    String nodeId = workflowNode.getNodeId();
    if (!isWorkflowInstanceNodePresent(id, nodeId)){
      throw new WorkflowInstanceNodeDoesNotExistsException(id, nodeId);
    }
    WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(id);
    NodeDataResource nodeData = workflowInstance.getNodeData(nodeId);
    return nodeData.getStartTime();
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            return provenanceRegistry.getWorkflowStartTime(workflowInstance);
        }
        if (!isWorkflowInstanceExists(workflowInstance.getWorkflowExecutionId(),true)){
      throw new WorkflowInstanceDoesNotExistsException(workflowInstance.getWorkflowExecutionId());
    }
    WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowExecutionId());
    return wi.getStartTime();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.