{
if (node instanceof LiteralValuesNode)
{
LiteralValuesNode literal = (LiteralValuesNode)node;
List<Object> values = literal.getValues();
Connection output = literal.getOutput();
for (RequestNodeInput target : output.getTargets())
{
RequestNode targetNode = target.getRequestNode();
if (targetNode instanceof ProcessingElementNode)
{
ProcessingElementNode peNode = (ProcessingElementNode)targetNode;
String dataSourceName = (String)peNode.getAnnotation(AnnotationKeys.DATA_SOURCE_ANCHOR);
if (dataSourceName != null)
{
if (peNode.getProcessingElementDescriptor().getInput(target.getName()).getIsDataSourceInput())
{
String executionEngine = (String)peNode.getAnnotation(AnnotationKeys.EXECUTION_ENGINE);
String localDataSource;
try
{
localDataSource = mExecutionEngineRegistry.getLocalDataSourceName(executionEngine, dataSourceName);
}
catch (UnknownExecutionEngineException e)
{
throw new RuntimeException(e);
}
values.clear();
values.add(localDataSource);
}
}
}
ProcessingElement activity = mPEs.get(targetNode);
insertLiteralValues(literal, activity, target);
}
}
else if (node instanceof CompositeProcessingElement)
{
CompositeProcessingElement composite =
(CompositeProcessingElement) node;
connectPipes(composite.getElements());
}
else if (node instanceof ProcessingElementNode)
{
ProcessingElement activity = mPEs.get(node);
Location sourceLocation = (Location)node.getAnnotation(AnnotationKeys.LOCATION);
for (Entry<String, Map<Integer, Connection>> output : node.getAllOutputs().entrySet())
{
Map<Integer, Connection> connections = output.getValue();
for (Entry<Integer, Connection> entry : connections.entrySet())
{
Connection connection = entry.getValue();
for (RequestNodeInput consumer : connection.getTargets())
{
if (consumer.getRequestNode() instanceof ExternalOutputNode)
{
// we've already connected this output
continue;