// Input ports
List<Port> inputPorts = workflowDescription.getInputPorts();
for (Port p : inputPorts) {
if (ComponentConstants.VALUE_LEFT_OBJECT.equals(p.getValue())) {
if (leftSource == InputSource.SOURCE_OBJECT) {
qa.addInputPort(new InputPort(p.getName(), 0));
workflow.addDatalink(new Datalink(workflow, SOURCE_PORT_NAME, qa, p.getName()));
} else if (leftSource == InputSource.TARGET_OBJECT) {
qa.addInputPort(new InputPort(p.getName(), 0));
workflow.addDatalink(new Datalink(migration, migrationTargetPortName, qa, p.getName()));
}
} else if (ComponentConstants.VALUE_RIGHT_OBJECT.equals(p.getValue())) {
if (rightSource == InputSource.SOURCE_OBJECT) {
qa.addInputPort(new InputPort(p.getName(), 0));
workflow.addDatalink(new Datalink(workflow, SOURCE_PORT_NAME, qa, p.getName()));
} else if (rightSource == InputSource.TARGET_OBJECT) {
qa.addInputPort(new InputPort(p.getName(), 0));
workflow.addDatalink(new Datalink(migration, migrationTargetPortName, qa, p.getName()));
}
} else if (ComponentConstants.VALUE_PARAMETER.equals(p.getValue())) {
qa.addInputPort(new InputPort(p.getName(), 0));
TextConstant c = new TextConstant(p.getName(), parameters.get(p.getName()));
workflow.addProcessor(c);
workflow.addDatalink(new Datalink(c, "value", qa, p.getName()));
}
}