Package edu.indiana.extreme.xbaya.graph.system

Examples of edu.indiana.extreme.xbaya.graph.system.EndifNode


        } else if (GraphSchema.NODE_TYPE_MERGE.equals(type)) {
            node = new EndForEachNode(nodeElement);
        } 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_MEMO.equals(type)) {
            node = new MemoNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_RECEIVE.equals(type)) {
            node = new ReceiveNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_BLOCK.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) {
        EndifNode node = new EndifNode(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

      throw new WorkFlowInterpreterException("Cannot evaluate XPath in If Condition: " + booleanExpression);
    }
  }

  private void handleEndIf(Node node) throws XBayaException {
    EndifNode endIfNode = (EndifNode) node;
    SystemComponentInvoker invoker = new SystemComponentInvoker();

    List<DataPort> ports = endIfNode.getOutputPorts();
    for (int outputPortIndex = 0, inputPortIndex = 0; outputPortIndex < ports.size(); outputPortIndex++, inputPortIndex = inputPortIndex + 2) {
     
      Object inputVal = findInputFromPort(endIfNode.getInputPort(inputPortIndex));
     
      Object inputVal2 = findInputFromPort(endIfNode.getInputPort(inputPortIndex + 1));           

      if ((inputVal == null && inputVal2 == null) || (inputVal != null && inputVal2 != null)) {
        throw new WorkFlowInterpreterException("EndIf gets wrong input number" + "Port:" + inputPortIndex + " and " + (inputPortIndex + 1));
      }

      Object value = inputVal != null ? inputVal : inputVal2;
      invoker.addOutput(endIfNode.getOutputPort(outputPortIndex).getID(), value);
    }

    this.invokerMap.put(node, invoker);

    node.getGUI().setBodyColor(NodeState.FINISHED.color);
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.graph.system.EndifNode

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.