Examples of InputNode


Examples of org.apache.airavata.workflow.model.graph.system.InputNode

      if (null == inputVal) {
        throw new WorkFlowInterpreterException("Unable to find inputs for the subworkflow node node:" + node.getID());
      }

      for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
        InputNode inputNode = (InputNode) iterator.next();
        if (inputNode.getName().equals(port.getName())) {
          inputNode.setDefaultValue(inputVal);
        }
      }
    }
    for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
      InputNode inputNode = (InputNode) iterator.next();
      if (inputNode.getDefaultValue() == null) {
        throw new WorkFlowInterpreterException("Input not set for  :" + inputNode.getID());
      }

    }

    try {
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

        }

        // Create input fields
        List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        for (Iterator<InputNode> iterator = inputNodes.iterator(); iterator.hasNext();) {
            InputNode node = iterator.next();
            String id = node.getID();
            QName parameterType = node.getParameterType();

            /*
             * If input node has no connection, skip it
             */
            if (parameterType == null) {
                iterator.remove();
                continue;
            }

            JLabel nameLabel = new JLabel(id);
            JLabel typeField = new JLabel(parameterType.getLocalPart());
            XBayaTextField paramField = new XBayaTextField();
            Object value = node.getDefaultValue();

            String valueString;
            if (value == null) {
                valueString = "";
            } else {
                if (value instanceof XmlElement) {
                    XmlElement valueElement = (XmlElement) value;
                    valueString = XMLUtil.xmlElementToString(valueElement);
                } else {
                    // Only string comes here for now.
                    valueString = value.toString();
                }
            }

            if (!node.isVisibility()) {
                paramField.setEditable(false);
            }
            paramField.setText(valueString);
            this.parameterPanel.add(nameLabel);
            this.parameterPanel.add(typeField);
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        builder.newFragment("inputs");
        new ODEClient();
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            inputNode.getID();
            String value = parameterTextField.getText();
            inputNode.setDefaultValue(value);
        }

        final String gFacUrl = ((URI) this.gfacUrlListField.getSelectedItem()).toASCIIString();
        if (null != gFacUrl && !"".equals(gFacUrl)) {
            try {
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        builder.newFragment("inputs");
        new ODEClient();
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            inputNode.getID();
            String value = parameterTextField.getText();
            inputNode.setDefaultValue(value);
        }

        final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
        if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl)) {
            try {
                this.engine.getConfiguration().setWorkflowInterpreterURL(new URI(workflowInterpreterUrl));
            } catch (URISyntaxException e) {
                this.engine.getGUI().getErrorWindow().error(e);
            }
        }

        final String gFacUrl = this.gfacTextField.getText();
        if (null != gFacUrl && !"".equals(gFacUrl)) {
            try {
                this.engine.getConfiguration().setGFacURL(new URI(gFacUrl));
            } catch (URISyntaxException e) {
                this.engine.getGUI().getErrorWindow().error(e);
            }
        }
        this.engine.getConfiguration().setTopic(topic);

        final String topicString = topic;
        new Thread() {
            /**
             * @see java.lang.Thread#run()
             */
            @Override
            public void run() {

                try {
                    WorkflowInterpreterLaunchWindow.this.engine.getMonitor().getConfiguration().setTopic(topicString);

                    WorkflowInterpreterLaunchWindow.this.engine.getMonitor().start();
                } catch (MonitorException e1) {
                    WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e1);
                }
                try {

                    WorkflowInterpretorStub stub = new WorkflowInterpretorStub(engine.getConfiguration()
                            .getWorkflowInterpreterURL().toString());
                    NameValue[] configurations = new NameValue[6];
                    configurations[0] = new NameValue();
                    configurations[0].setName(HeaderConstants.HEADER_ELEMENT_GFAC);
                    configurations[0].setValue(engine.getConfiguration().getGFacURL().toString());
                    configurations[1] = new NameValue();
                    configurations[1].setName(HeaderConstants.HEADER_ELEMENT_REGISTRY);
                    if (null == engine.getConfiguration().getRegistryURL()) {
                        configurations[1].setValue(XBayaConstants.REGISTRY_URL.toString());
                    } else {
                        configurations[1].setValue(engine.getConfiguration().getRegistryURL().toString());
                    }
                    configurations[2] = new NameValue();
                    configurations[2].setName(HeaderConstants.HEADER_ELEMENT_PROXYSERVER);
                    configurations[2].setValue(engine.getConfiguration().getMyProxyServer());

                    configurations[3] = new NameValue();
                    configurations[3].setName(HeaderConstants.HEADER_ELEMENT_BROKER);
                    configurations[3].setValue(engine.getConfiguration().getBrokerURL().toString());

                    configurations[4] = new NameValue();
                    configurations[4].setName(HeaderConstants.HEADER_ELEMENT_MSGBOX);
                    configurations[4].setValue(engine.getConfiguration().getMessageBoxURL().toString());

                    configurations[5] = new NameValue();
                    configurations[5].setName(HeaderConstants.HEADER_ELEMENT_DSC);
                    configurations[5].setValue(engine.getConfiguration().getDSCURL().toString());

                    NameValue[] inputNameVals = new NameValue[inputNodes.size()];
                    for (int i = 0; i < inputNodes.size(); i++) {
                        inputNameVals[i] = new NameValue();
                        InputNode inputNode = inputNodes.get(i);
                        String id = inputNode.getID();
                        String value = inputNode.getDefaultValue().toString();
                        inputNameVals[i].setName(id);
                        inputNameVals[i].setValue(value);
                    }
                    XBayaConfiguration configuration = engine.getConfiguration();
                    String myProxyUsername = configuration.getRegistryUserName();
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        builder.newFragment("inputs");
        new ODEClient();
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            inputNode.getID();
            String value = parameterTextField.getText();
            inputNode.setDefaultValue(value);
        }

        final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
        if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl)) {
            try {
                this.engine.getConfiguration().setWorkflowInterpreterURL(new URI(workflowInterpreterUrl));
            } catch (URISyntaxException e) {
                this.engine.getGUI().getErrorWindow().error(e);
            }
        }

        final String gFacUrl = this.gfacTextField.getText();
        if (null != gFacUrl && !"".equals(gFacUrl)) {
            try {
                this.engine.getConfiguration().setGFacURL(new URI(gFacUrl));
            } catch (URISyntaxException e) {
                this.engine.getGUI().getErrorWindow().error(e);
            }
        }
        this.engine.getConfiguration().setTopic(topic);

        new Thread() {
            @Override
            public void run() {

                try {
                    List<WorkflowInput> workflowInputs=new ArrayList<WorkflowInput>();
                    for (int i = 0; i < inputNodes.size(); i++) {
                      InputNode inputNode = inputNodes.get(i);
                      workflowInputs.add(new WorkflowInput(inputNode.getID(), inputNode.getDefaultValue().toString()));
                    }
                    AiravataAPI api = engine.getConfiguration().getAiravataAPI();
                   
                    ExperimentAdvanceOptions options = api.getExecutionManager().createExperimentAdvanceOptions(instanceNameFinal, api.getCurrentUser(), null);
                    if (AmazonCredential.getInstance().getAwsAccessKeyId() != null) {
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

      if (null == inputVal) {
        throw new WorkFlowInterpreterException("Unable to find inputs for the subworkflow node node:" + node.getID());
      }

      for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
        InputNode inputNode = (InputNode) iterator.next();
        if (inputNode.getName().equals(port.getName())) {
          inputNode.setDefaultValue(inputVal);
        }
      }
    }
    for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
      InputNode inputNode = (InputNode) iterator.next();
      if (inputNode.getDefaultValue() == null) {
        throw new WorkFlowInterpreterException("Input not set for  :" + inputNode.getID());
      }

    }

    try {
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

      if (null == inputVal) {
        throw new WorkFlowInterpreterException("Unable to find inputs for the subworkflow node node:" + node.getID());
      }

      for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
        InputNode inputNode = (InputNode) iterator.next();
        if (inputNode.getName().equals(port.getName())) {
          inputNode.setDefaultValue(inputVal);
        }
      }
    }
    for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
      InputNode inputNode = (InputNode) iterator.next();
      if (inputNode.getDefaultValue() == null) {
        throw new WorkFlowInterpreterException("Input not set for  :" + inputNode.getID());
      }

    }

    try {
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        builder.newFragment("inputs");
        new ODEClient();
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            inputNode.getID();
            String value = parameterTextField.getText();
            inputNode.setDefaultValue(value);
        }

        final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
        if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl)) {
            try {
                this.engine.getConfiguration().setWorkflowInterpreterURL(new URI(workflowInterpreterUrl));
            } catch (URISyntaxException e) {
                this.engine.getGUI().getErrorWindow().error(e);
            }
        }

        final String gFacUrl = this.gfacTextField.getText();
        if (null != gFacUrl && !"".equals(gFacUrl)) {
            try {
                this.engine.getConfiguration().setGFacURL(new URI(gFacUrl));
            } catch (URISyntaxException e) {
                this.engine.getGUI().getErrorWindow().error(e);
            }
        }
        this.engine.getConfiguration().setTopic(topic);

        new Thread() {
            @Override
            public void run() {

                try {
                    List<WorkflowInput> workflowInputs=new ArrayList<WorkflowInput>();
                    for (int i = 0; i < inputNodes.size(); i++) {
                      InputNode inputNode = inputNodes.get(i);
                      workflowInputs.add(new WorkflowInput(inputNode.getID(), inputNode.getDefaultValue().toString()));
                    }
                    AiravataAPI api = engine.getConfiguration().getAiravataAPI();
                   
                    ExperimentAdvanceOptions options = api.getExecutionManager().createExperimentAdvanceOptions(instanceNameFinal, api.getCurrentUser(), null);
                    if (AmazonCredential.getInstance().getAwsAccessKeyId() != null) {
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

                // This should not happen.
                throw new WorkflowRuntimeException(originalFromNode.getClass().getName());
            }
            Port originalToPort = originalFromPort.getToPorts().get(0);
            PortImpl toPort = graph.getPort(originalToPort.getID());
            InputNode inputNode = (InputNode) toPort.getFromNode();
            inputNode.setDefaultValue(output);
        }

        return workflow;
    }
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

     * @throws GraphException
     */
    private void createInputNodes(WSGraph graph, Set<WSPort> originalFromPorts) throws GraphException {
        InputComponent inputComponent = new InputComponent();
        for (WSPort originalFromPort : originalFromPorts) {
            InputNode inputNode = inputComponent.createNode(graph);
            List<Port> originalToPorts = originalFromPort.getToPorts();
            boolean first = true;
            for (Port originalToPort : originalToPorts) {
                String toPortID = originalToPort.getID();
                Port toPort = graph.getPort(toPortID);
                graph.addEdge(inputNode.getPort(), toPort);
                if (first) {
                    first = false;
                    Point position = NodeController.getGUI(originalToPort).getPosition();
                    Point inputNodePosition = new Point(0, position.y);
                    inputNode.setPosition(inputNodePosition);
                }
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.