for(InputPortImpl in : inputs) {
final InputPortImpl inputPort = in;
String portName = in.port().portName();
final OutputPortImpl outputPort = new OutputPortImpl(new PortReference(null, portName));
subnetwork.addOutputPort(outputPort.portReference().toString(), outputPort);
final boolean isSubstreamSensitive = subnet.isSubstreamSensitivePort(portName);
final AbstractRunnableComponent runnableComponent = createInputComponent(portName, inputPort, outputPort, isSubstreamSensitive);
subnetwork.addComponent(runnableComponent);
}
for(OutputPortImpl out : outputs) {
final OutputPortImpl outputPort = out;
String portName = out.portReference().portName();
final InputPortImpl inputPort = new InputPortImpl(new PortReference(null, portName));
subnetwork.addInputPort(inputPort.port().toString(), inputPort);
final boolean isSubnetSensitive = subnet.isSubstreamSensitivePort(portName);
final AbstractRunnableComponent runnableComponent = createOutputComponent(portName, inputPort, outputPort, isSubnetSensitive);
subnetwork.addComponent(runnableComponent);