ActivityTerminatedException,
ActivityUserException
{
int linearIndex = ((Number)iterationInputs[0]).intValue();
TupleListIterator tuples = (TupleListIterator)iterationInputs[1];
MetadataWrapper wrapper = tuples.getMetadataWrapper();
TupleMetadata metadata = (TupleMetadata)wrapper.getMetadata();
validateLinearIndex(linearIndex, metadata);
List<UpdateableTuple> data = getTuples(tuples);
filter(linearIndex, data);
writeOutput(wrapper, data);
}