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);