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

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


        keywords[i] = ((InputNode) node).getName();
        values[i] = ((InputNode) node).getDefaultValue();
                //Saving workflow input Node data before running the workflow
                WorkflowNodeType workflowNodeType = new WorkflowNodeType();
                workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.INPUTNODE);
                WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowExecution(getConfig().getTopic(),
                        getConfig().getTopic()), node.getID());
                this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowInstanceNodeInput(workflowInstanceNode, keywords[i] + "=" + (String) values[i]);
                this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowNodeType(workflowInstanceNode, workflowNodeType);
      }
      this.config.getNotifier().workflowStarted(values, keywords);
View Full Code Here


            ((OutputNode) node).setDescription(val.toString());
          }
                    // Saving output Node data in to database
                    WorkflowNodeType workflowNodeType = new WorkflowNodeType();
                    workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.OUTPUTNODE);
                    WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowExecution(config.getTopic(), config.getTopic()), node.getID());
                    String portname = node.getName();
                    String portValue = ((OutputNode) node).getDescription();
                    this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowInstanceNodeOutput(workflowInstanceNode, portname + "=" + portValue);
                    this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowNodeType(workflowInstanceNode, workflowNodeType);
View Full Code Here

        }

      }
            if (inputs!=null) {
        try {
          this.airavataAPI.getProvenanceManager().setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, experimentId), node.getID()), xsul5.XmlConstants.BUILDER.serializeToString(inputs));
                } catch (AiravataAPIInvocationException 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.airavataAPI.getProvenanceManager().setWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId,experimentId),node.getID()),xsul5.XmlConstants.BUILDER.serializeToString(outputs));
            } catch (AiravataAPIInvocationException 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 WorkflowExecution(workflowInstanceID,workflowInstanceID), nodeID);
      airavataAPI.getProvenanceManager().setWorkflowInstanceNodeInput(node, inputs);
            airavataAPI.getProvenanceManager().setWorkflowNodeType(node, workflowNodeType);
            airavataAPI.getProvenanceManager().setWorkflowInstanceNodeStatus(workflowInstanceID, workflowInstanceID, nodeID, WorkflowExecutionStatus.State.STARTED);
        } catch (AiravataAPIInvocationException 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 WorkflowExecution(workflowInstanceID,workflowInstanceID), nodeID);
            airavataAPI.getProvenanceManager().setWorkflowInstanceNodeOutput(node, inputs);
            airavataAPI.getProvenanceManager().setWorkflowNodeType(node,workflowNodeType);
            airavataAPI.getProvenanceManager().setWorkflowInstanceNodeStatus(workflowInstanceID, workflowInstanceID, nodeID, WorkflowExecutionStatus.State.FINISHED);
        } catch (AiravataAPIInvocationException e) {
            logger.error("Error updating Wokflow Node status !!");
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

TOP

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

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.