Package org.apache.airavata.registry.api.exception.worker

Examples of org.apache.airavata.registry.api.exception.worker.WorkflowInstanceNodeDoesNotExistsException


  @Override
  public void updateWorkflowNodeInput(WorkflowInstanceNode node, String data)
      throws RegistryException {
    if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),true)){
      throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(), node.getNodeId());
    }
    WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId());
    NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
    nodeData.setInputs(data);
    nodeData.save();
View Full Code Here


  @Override
  public void updateWorkflowNodeOutput(WorkflowInstanceNode node, String data) throws RegistryException {
    try {
      if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(),true)){
        throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(), node.getNodeId());
      }
      WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId());
      NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
      nodeData.setOutputs(data);
      nodeData.save();
View Full Code Here

      WorkflowInstanceNodeStatus workflowStatusNode)
      throws RegistryException {
    WorkflowInstance workflowInstance = workflowStatusNode.getWorkflowInstanceNode().getWorkflowInstance();
    String nodeId = workflowStatusNode.getWorkflowInstanceNode().getNodeId();
    if (!isWorkflowInstanceNodePresent(workflowInstance.getWorkflowInstanceId(), nodeId, true)){
      throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstance.getWorkflowInstanceId(), nodeId);
    }
    NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowInstanceId()).getNodeData(nodeId);
    nodeData.setStatus(workflowStatusNode.getExecutionStatus().toString());
    Timestamp t = new Timestamp(workflowStatusNode.getStatusUpdateTime().getTime());
    if (workflowStatusNode.getExecutionStatus()==ExecutionStatus.STARTED){
View Full Code Here

  public WorkflowInstanceNodeStatus getWorkflowNodeStatus(
      WorkflowInstanceNode workflowNode) throws RegistryException {
    String id = workflowNode.getWorkflowInstance().getWorkflowInstanceId();
    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 WorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowInstance(workflowInstance.getExperimentID(), workflowInstance.getWorkflowInstanceID()), nodeData.getNodeID()), nodeData.getStatus()==null?null:ExecutionStatus.valueOf(nodeData.getStatus()),nodeData.getLastUpdateTime());
  }
View Full Code Here

  public Date getWorkflowNodeStartTime(WorkflowInstanceNode workflowNode)
      throws RegistryException {
    String id = workflowNode.getWorkflowInstance().getWorkflowInstanceId();
    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

  @Override
  public void updateWorkflowNodeGramData(
      WorkflowNodeGramData workflowNodeGramData) throws RegistryException {
    if (!isWorkflowInstanceNodePresent(workflowNodeGramData.getWorkflowInstanceId(),workflowNodeGramData.getNodeID(), true)){
      throw new WorkflowInstanceNodeDoesNotExistsException(workflowNodeGramData.getWorkflowInstanceId(),workflowNodeGramData.getNodeID());
    }
    WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(workflowNodeGramData.getWorkflowInstanceId());
    GramDataResource gramData;
    if (workflowInstance.isGramDataExists(workflowNodeGramData.getNodeID())){
      gramData = workflowInstance.getGramData(workflowNodeGramData.getNodeID());
View Full Code Here

  @Override
  public WorkflowInstanceNodeData getWorkflowInstanceNodeData(
      String workflowInstanceId, String nodeId) throws RegistryException {
    if (!isWorkflowInstanceNodePresent(workflowInstanceId,nodeId)){
      throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstanceId,nodeId);
    }
    NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstanceId).getNodeData(nodeId);
    WorkflowInstanceNodeData data = new WorkflowInstanceNodeData(new WorkflowInstanceNode(new WorkflowInstance(nodeData.getWorkflowDataResource().getExperimentID(),nodeData.getWorkflowDataResource().getWorkflowInstanceID()),nodeData.getNodeID()));
    data.setInput(nodeData.getInputs());
    data.setOutput(nodeData.getOutputs());
View Full Code Here

  @Override
  public void updateWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type)
      throws RegistryException {
    try {
      if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId(), true)){
        throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowInstanceId(),node.getNodeId());
      }
      NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowInstanceId()).getNodeData(node.getNodeId());
      nodeData.setNodeType(type.getNodeType().toString());
      nodeData.save();
    } catch (RegistryException e) {
View Full Code Here

      throws RegistryException {
        if (provenanceRegistry != null){
            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

        if (provenanceRegistry != null){
            provenanceRegistry.updateWorkflowNodeOutput(node, data);
        }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();
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.exception.worker.WorkflowInstanceNodeDoesNotExistsException

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.