+ 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 = InterpreterUtil.findInputFromPort(
endIfNode.getInputPort(inputPortIndex), this.invokerMap);
Object inputVal2 = InterpreterUtil
.findInputFromPort(
endIfNode.getInputPort(inputPortIndex + 1),
this.invokerMap);
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);