StepData createStepData(final TextRange textRange) {
        final SourceLocation sourceLocation;
        if (foundLocation != null) {

            // Will rely on SourcePresenter to adjust the data range to fit the
            // highlight
            // At this point stepLocation is the location prior to the found record.
            // Also recordNo is one based, segmentNo is zero based.
            // So a prior stepLocation.recordNo == 0 equates to a current segment no of 0
            sourceLocation = SourceLocation.builder(foundLocation.getMetaId())
                    .withChildStreamType(metaHolder.getChildDataType())
                    .withPartIndex(foundLocation.getPartIndex())
                    .withRecordIndex(foundLocation.getRecordIndex())
                    .withDataRange(DataRange.fromLocation(DefaultLocation.of(1, 1)))
                    .withHighlight(textRange)
                    .build();

            LOGGER.debug(() -> LogUtil.message("creating stepData {}:{}:{} " +
                                               "from foundLocation {}:{}:{} with textRange: {}",
                    sourceLocation.getMetaId(),
                    sourceLocation.getPartIndex(),
                    sourceLocation.getRecordIndex(),
                    foundLocation.getMetaId(),
                    foundLocation.getPartIndex(),
                    foundLocation.getRecordIndex(),
                    textRange));
        } else {
            sourceLocation = null;
        }

        final StepData stepData = new StepData();
        stepData.setSourceLocation(sourceLocation);

        // Store the current data and reset for each filter.
        final LoggingErrorReceiver errorReceiver = getErrorReceiver();
        for (final ElementMonitor monitor : monitors) {
            final ElementData elementData = monitor.getElementData(errorReceiver, textRange);
            stepData.getElementMap().put(monitor.getElementId(), elementData);
        }

        return stepData;
    }
Called by the step detector to tell us that we have reached the end of a
record.

@return True if the step detector should terminate stepping.
stroom-pipeline/src/main/java/stroom/pipeline/stepping/SteppingController.java