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

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


  }

  @Override
  public boolean saveWorkflowExecutionStatus(String experimentId,
      ExecutionStatus status) throws RegistryException {
    this.status.put(experimentId, new WorkflowInstanceStatus(new WorkflowInstance(experimentId,experimentId),status));
    return true;
  }
View Full Code Here


    public boolean saveWorkflowData(String experimentID,String workflowInstanceID,String workflowTemplateID) {
        Timestamp currentTime = new Timestamp((new java.util.Date()).getTime());
        try {
            registry.setWorkflowInstanceTemplateName(workflowInstanceID, workflowTemplateID);
            registry.updateWorkflowInstanceStatus(new WorkflowInstanceStatus(new WorkflowInstance(experimentID, workflowInstanceID), WorkflowInstanceStatus.ExecutionStatus.STARTED,currentTime));
        } catch (RegistryException e) {
            logger.error("Error saving Workflow Data !!");
        }
        return true;
    }
View Full Code Here

        }

      }
            if (inputs!=null) {
        try {
          this.registry.updateWorkflowNodeInput(new WorkflowInstanceNode(new WorkflowInstance(experimentId,experimentId),node.getID()),xsul5.XmlConstants.BUILDER.serializeToString(inputs));
        } catch (RegistryException e) {
          throw new WorkflowException(e);
        }
        // deal with the outputs
      }
      XmlElement outputs = elem.newElement("outputs");
      elem.addChild(outputs);

      List<DataPort> outputPorts = node.getOutputPorts();
      for (DataPort outputPort : outputPorts) {
        String outputName = outputPort.getName();

        XmlElement outputParamElement = outputs.newElement(outputName);
        outputs.addChild(outputParamElement);
        Object ouputParamValue = invokerMap.get(node).getOutput(
            outputName);

        if (ouputParamValue instanceof org.xmlpull.v1.builder.XmlElement) {
          ouputParamValue = XMLUtil
              .xmlElement3ToXmlElement5((org.xmlpull.v1.builder.XmlElement) ouputParamValue);
        }

        if (ouputParamValue != null) {
          outputParamElement.addChild(ouputParamValue);
        } else {
          outputParamElement.addChild("null");
        }
      }
            try {
        this.registry.updateWorkflowNodeOutput(new WorkflowInstanceNode(new WorkflowInstance(experimentId,experimentId),node.getID()),xsul5.XmlConstants.BUILDER.serializeToString(outputs));
            } catch (RegistryException e) {
        throw new WorkflowException(e);
      }
    }
  }
View Full Code Here

    public boolean workflowStarted(String workflowInstanceID,String nodeID,String inputs,String workflowID){
        try {
            //todo we currently save only service nodes
            WorkflowNodeType workflowNodeType = new WorkflowNodeType();
            workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.SERVICENODE);
            WorkflowInstanceNode node = new WorkflowInstanceNode(new WorkflowInstance(workflowInstanceID,workflowInstanceID), nodeID);
      registry.updateWorkflowNodeInput(node,inputs);
            registry.updateWorkflowNodeType(node, workflowNodeType);
            registry.updateWorkflowNodeStatus(workflowInstanceID, nodeID, WorkflowInstanceStatus.ExecutionStatus.STARTED);
        } catch (RegistryException e) {
            logger.error("Error updating Wokflow Node status !!");
View Full Code Here

    public boolean workflowFinished(String workflowInstanceID,String nodeID,String inputs,String workflowID){
        try {
          WorkflowNodeType workflowNodeType = new WorkflowNodeType();
            workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.SERVICENODE);
            WorkflowInstanceNode node = new WorkflowInstanceNode(new WorkflowInstance(workflowInstanceID,workflowInstanceID), nodeID);
            registry.updateWorkflowNodeOutput(node,inputs);
            registry.updateWorkflowNodeType(node,workflowNodeType);
            registry.updateWorkflowNodeStatus(workflowInstanceID, nodeID, WorkflowInstanceStatus.ExecutionStatus.FINISHED);
        } catch (RegistryException e) {
            logger.error("Error updating Wokflow Node status !!");
View Full Code Here

  @Override
  public void setWorkflowInstanceNodeInput(String experimentId,
      String workflowInstanceId, String nodeId, String data)
      throws AiravataAPIInvocationException {
    setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowInstance(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 WorkflowInstance(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 WorkflowInstance(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 WorkflowInstance(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 WorkflowInstance(experimentId, workflowInstanceId), nodeId));

  }
View Full Code Here

TOP

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

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.