code: @Override
  	protected void initialize() throws Exception {
  		super.initialize();
  
  		// set the last output collector of this task to reflect the iteration intermediate state update
  		// a) workset update
  		// b) solution set update
  		// c) none
  
  		Collector<OT> delegate = getLastOutputCollector();
  		if (isWorksetUpdate) {
  			// sanity check: we should not have a solution set and workset update at the same time
  			// in an intermediate task
  			if (isSolutionSetUpdate) {
  				throw new IllegalStateException("Plan bug: Intermediate task performs workset and solutions set update.");
  			}
  
  			Collector<OT> outputCollector = createWorksetUpdateOutputCollector(delegate);
  
  			// we need the WorksetUpdateOutputCollector separately to count the collected elements
  			if (isWorksetIteration) {
  				worksetUpdateOutputCollector = (WorksetUpdateOutputCollector<OT>) outputCollector;
  			}
  
  			setLastOutputCollector(outputCollector);
  		} else if (isSolutionSetUpdate) {
  			setLastOutputCollector(createSolutionSetUpdateOutputCollector(delegate));
  		}
  	}
docs: --------------------------------------------------------------------------------------------