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

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


                        if (nodeNameRegEx != null && !serviceNode.getName().matches(nodeNameRegEx)) {
                            continue;
                        }
                        Node ioNode = getOrAddNode(serviceNode, type);
                        if (ioNode.hasProperty(PROPERTY_WORKFLOW_IO_CONTENT)) {
              WorkflowServiceIOData workflowIOData = new WorkflowServiceIOData();
              workflowIOData.setExperimentId(experimentNode
                  .getName());
              workflowIOData
                  .setWorkflowId(workflowNode.getName());
              workflowIOData.setWorkflowName(workflowName);
              workflowIOData.setNodeId(serviceNode.getName());
              workflowIOData.setValue(ioNode.getProperty(
                  PROPERTY_WORKFLOW_IO_CONTENT).getString());
              workflowIODataList.add(workflowIOData);
            }
                    }
                }
View Full Code Here


        }

      }
            if (inputs!=null) {
        try {
          this.registry.saveWorkflowExecutionServiceInput(new WorkflowServiceIOData(
              xsul5.XmlConstants.BUILDER.serializeToString(inputs),
              experimentId, node.getID(), this.workflowName));
        } 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.saveWorkflowExecutionServiceOutput(new WorkflowServiceIOData(xsul5.XmlConstants.BUILDER.serializeToString(outputs), experimentId, node.getID(),this.workflowName));
            } catch (RegistryException e) {
        throw new WorkflowException(e);
      }
    }
  }
View Full Code Here

                        if (nodeNameRegEx != null && !serviceNode.getName().matches(nodeNameRegEx)) {
                            continue;
                        }
                        Node ioNode = getOrAddNode(serviceNode, type);
                        if (ioNode.hasProperty(PROPERTY_WORKFLOW_IO_CONTENT)) {
              WorkflowServiceIOData workflowIOData = new WorkflowServiceIOData();
              workflowIOData.setExperimentId(experimentNode
                  .getName());
              workflowIOData
                  .setWorkflowId(workflowNode.getName());
              workflowIOData.setWorkflowName(workflowName);
              workflowIOData.setNodeId(serviceNode.getName());
              workflowIOData.setValue(ioNode.getProperty(
                  PROPERTY_WORKFLOW_IO_CONTENT).getString());
              workflowIODataList.add(workflowIOData);
            }
                    }
                }
View Full Code Here

        }

      }
            if (inputs!=null) {
        try {
          this.registry.saveWorkflowExecutionServiceInput(new WorkflowServiceIOData(
              xsul5.XmlConstants.BUILDER.serializeToString(inputs),
              experimentId, node.getID(), this.workflowName));
        } catch (RegistryException e) {
          throw new XBayaException(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.saveWorkflowExecutionServiceOutput(new WorkflowServiceIOData(xsul5.XmlConstants.BUILDER.serializeToString(outputs), experimentId, node.getID(),this.workflowName));
            } catch (RegistryException e) {
        throw new XBayaException(e);
      }
    }
  }
View Full Code Here

TOP

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

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.