Package org.apache.airavata.registry.api.workflow

Examples of org.apache.airavata.registry.api.workflow.WorkflowExecution


  @Override
  public void updateWorkflowNodeStatus(NodeExecutionStatus workflowStatusNode) throws RegistryException {
        if (provenanceRegistry != null){
            provenanceRegistry.updateWorkflowNodeStatus(workflowStatusNode);
        }else {
            WorkflowExecution workflowInstance = workflowStatusNode.getWorkflowInstanceNode().getWorkflowInstance();
            String nodeId = workflowStatusNode.getWorkflowInstanceNode().getNodeId();
            if (!isWorkflowInstanceNodePresent(workflowInstance.getWorkflowExecutionId(), nodeId, true)){
                throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstance.getWorkflowExecutionId(), nodeId);
            }
            NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowExecutionId()).getNodeData(nodeId);
            nodeData.setStatus(workflowStatusNode.getExecutionStatus().toString());
            Timestamp t = new Timestamp(workflowStatusNode.getStatusUpdateTime().getTime());
            if (workflowStatusNode.getExecutionStatus()==State.STARTED){
                nodeData.setStartTime(t);
            }
            nodeData.setLastUpdateTime(t);
            nodeData.save();
            //Each time node status is updated the the time of update for the workflow status is going to be the same
            WorkflowExecutionStatus currentWorkflowInstanceStatus = getWorkflowInstanceStatus(workflowInstance.getWorkflowExecutionId());
            updateWorkflowInstanceStatus(new WorkflowExecutionStatus(workflowInstance, currentWorkflowInstanceStatus.getExecutionStatus(), t));
        }
  }
View Full Code Here


  public void updateWorkflowNodeStatus(String workflowInstanceId,
      String nodeId, State status) throws RegistryException {
        if (provenanceRegistry != null){
            provenanceRegistry.updateWorkflowNodeStatus(workflowInstanceId, nodeId, status);
        }else {
            updateWorkflowNodeStatus(new WorkflowInstanceNode(new WorkflowExecution(workflowInstanceId, workflowInstanceId), nodeId), status);
        }

  }
View Full Code Here

    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

  @Override
  public void setWorkflowInstanceNodeInput(String experimentId,
      String workflowInstanceId, String nodeId, String data)
      throws AiravataAPIInvocationException {
    setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId), data);
  }
View Full Code Here

  @Override
  public void setWorkflowInstanceNodeOutput(String experimentId,
      String workflowInstanceId, String nodeId, String data)
      throws AiravataAPIInvocationException {
    setWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId), data);
   
  }
View Full Code Here

  }

  @Override
  public String getWorkflowInstanceNodeInput(String experimentId, String workflowInstanceId, String nodeId)
      throws AiravataAPIInvocationException {
    return getWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId));
  }
View Full Code Here

  }

  private Map<WorkflowInstanceNode, String> groupNodePortData(List<WorkflowNodeIOData> list) {
    Map<WorkflowInstanceNode,String> portData=new HashMap<WorkflowInstanceNode, String>();
    for (WorkflowNodeIOData data : list) {
      portData.put(new WorkflowInstanceNode(new WorkflowExecution(data.getExperimentId(), data.getWorkflowInstanceId()), data.getNodeId()), data.getValue());
    }
    return portData;
  }
View Full Code Here

  }

  @Override
  public String getWorkflowInstanceNodeOutput(String experimentId, String workflowInstanceId, String nodeId)
      throws AiravataAPIInvocationException {
    return getWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId));

  }
View Full Code Here

  }
 
  @Override
  public void setWorkflowInstanceStatus(String experimentId, String workflowInstanceId,
      State status) throws AiravataAPIInvocationException {
    setWorkflowInstanceStatus(new WorkflowExecutionStatus(new WorkflowExecution(experimentId, workflowInstanceId),status));
  }
View Full Code Here

  @Override
  public NodeExecutionStatus getWorkflowInstanceNodeStatus(
      String experimentId, String workflowInstaceId, String nodeId)
      throws AiravataAPIInvocationException {
    return getWorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowExecution(experimentId,workflowInstaceId),nodeId));
  }
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.workflow.WorkflowExecution

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.