Package org.apache.airavata.workflow.model.graph.system

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


    } else if (GraphSchema.NODE_TYPE_IF.equals(type)) {
      node = new IfNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_ENDIF.equals(type)) {
      node = new EndifNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_DOWHILE.equals(type)) {
      node = new DoWhileNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_ENDDOWHILE.equals(type)) {
      node = new EndDoWhileNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_MEMO.equals(type)) {
      node = new MemoNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_RECEIVE.equals(type)) {
View Full Code Here


  /**
   * @see edu.indiana.extreme.xbaya.component.Component#createNode(edu.indiana.extreme.xbaya.graph.Graph)
   */
  @Override
  public Node createNode(Graph graph) {
    DoWhileNode node = new DoWhileNode(graph);

    node.setName(NAME);
    node.setComponent(this);

    // Creates a unique ID for the node. This has to be after setName().
    node.createID();

    createPorts(node);
    return node;
  }
View Full Code Here

        // amount
        InputNode amount = (InputNode) workflow.addNode(this.inputComponent);
        amount.setPosition(new Point(10, 10));

        // if
        DoWhileNode doWhileNode = (DoWhileNode) workflow.addNode(this.doWhileComponent);
        doWhileNode.setPosition(new Point(200, 100));

        // Approver nodes
        Component approverComponent = this.componentRegistry.getComponent(Approver.WSDL_PATH);

        Node approver = workflow.addNode(approverComponent);
        approver.setPosition(new Point(350, 10));

        // const
        ConstantNode constYes = (ConstantNode) workflow.addNode(this.constantComponent);
        constYes.setPosition(new Point(350, 200));

        // endif
        Node endDoWhile = workflow.addNode(this.endDoWhileComponent);
        endDoWhile.setPosition(new Point(550, 100));

        // Output
        OutputNode output = (OutputNode) workflow.addNode(this.outputComponent);
        output.setPosition(new Point(700, 100));

        // Connect ports
        graph.addEdge(amount.getOutputPort(0), approver.getInputPort(0));
        graph.addEdge(amount.getOutputPort(0), doWhileNode.getInputPort(0));
        graph.addEdge(doWhileNode.getControlOutPorts().get(0), approver.getControlInPort());
        graph.addEdge(doWhileNode.getControlOutPorts().get(1), constYes.getControlInPort());
        graph.addEdge(approver.getOutputPort(0), endDoWhile.getInputPort(0));
        graph.addEdge(constYes.getOutputPort(0), endDoWhile.getInputPort(1));
        graph.addEdge(endDoWhile.getOutputPort(0), output.getInputPort(0));

        // Set the default values
        // This needs to be after connection.
        amount.setDefaultValue("0");
        constYes.setValue("Yes");
        doWhileNode.setXpath("$1 = 1");
        output.setConfiguredName("accept");
        output.setConfigured(true);

        return workflow;
    }
View Full Code Here

        // amount
        InputNode amount = (InputNode) workflow.addNode(this.inputComponent);
        amount.setPosition(new Point(10, 10));

        // if
        DoWhileNode doWhileNode = (DoWhileNode) workflow.addNode(this.doWhileComponent);
        doWhileNode.setPosition(new Point(200, 100));

        // Approver nodes
        Component approverComponent = this.componentRegistry.getComponent(Approver.WSDL_PATH);

        Node approver = workflow.addNode(approverComponent);
        approver.setPosition(new Point(350, 10));

        // const
        ConstantNode constYes = (ConstantNode) workflow.addNode(this.constantComponent);
        constYes.setPosition(new Point(350, 200));

        // endif
        Node endDoWhile = workflow.addNode(this.endDoWhileComponent);
        endDoWhile.setPosition(new Point(550, 100));

        // Output
        OutputNode output = (OutputNode) workflow.addNode(this.outputComponent);
        output.setPosition(new Point(700, 100));

        // Connect ports
        graph.addEdge(amount.getOutputPort(0), approver.getInputPort(0));
        graph.addEdge(amount.getOutputPort(0), doWhileNode.getInputPort(0));
        graph.addEdge(doWhileNode.getControlOutPorts().get(0), approver.getControlInPort());
        graph.addEdge(doWhileNode.getControlOutPorts().get(1), constYes.getControlInPort());
        graph.addEdge(approver.getOutputPort(0), endDoWhile.getInputPort(0));
        graph.addEdge(constYes.getOutputPort(0), endDoWhile.getInputPort(1));
        graph.addEdge(endDoWhile.getOutputPort(0), output.getInputPort(0));

        // Set the default values
        // This needs to be after connection.
        amount.setDefaultValue("0");
        constYes.setValue("Yes");
        doWhileNode.setXpath("$1 = 1");
        output.setConfiguredName("accept");
        output.setConfigured(true);

        return workflow;
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.model.graph.system.DoWhileNode

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.