// If tasks already exist, a change merge task must be used to merge
// existing output with this task output, otherwise this task can be
// added to the list directly.
if (tasks.size() > 0) {
ChangeMerger changeMerger;
// Create a new change merger merging the last task output with the current task.
changeMerger = new ChangeMerger(ConflictResolutionMethod.LatestSource, 10);
// Connect the inputs of this merger to the most recent change
// output and the new change output.
tasks.get(tasks.size() - 1).setChangeSink(changeMerger.getChangeSink(0));
changeReader.setChangeSink(changeMerger.getChangeSink(1));
tasks.add(changeReader);
tasks.add(changeMerger);
} else {