throw new TransformationException(
"No input " + ExternalOutputNode.INPUT_NAME
+ " defined for processing element "
+ ExternalOutputNode.NAME);
}
Connection data =
node.getInput(ExternalOutputNode.INPUT_NAME, 0);
ExternalOutputNode output = new ExternalOutputNode(name, gateway);
output.copyAnnotations(node);
GraphUtilities.replaceTarget(
data,
node,
new SingleRequestNodeInput(output, ExternalOutputNode.INPUT_NAME, 0));
output.setInput(data);
add.add(output);
LOG.debug("Created new external output node, name: " + name);
}
else if (ExternalInputNode.NAME.equals(node.getName()))
{
remove.add(node);
String name = getValue(node, ExternalInputNode.INPUT_RESULT, remove);
String gateway = getValue(node, ExternalInputNode.INPUT_GATEWAY, remove);
if (node.getAllOutputs().get(ExternalInputNode.OUTPUT_NAME) == null)
{
throw new TransformationException(
"No output " + ExternalInputNode.OUTPUT_NAME
+ " defined for processing element "
+ ExternalInputNode.NAME);
}
Connection data =
node.getOutput(ExternalInputNode.OUTPUT_NAME, 0);
ExternalInputNode result = new ExternalInputNode(name, gateway);
result.copyAnnotations(node);
result.connectOutput(
data.getSource().getOutput(
data.getSourceOutputName(),
data.getSourceOutputIndex()));
add.add(result);
LOG.debug("Created new external output node, name: " + name);
}
}
}