private ProcessorTask convert(final ProcessorTaskRecord record,
                                  final String nodeName,
                                  final String feedName,
                                  final ProcessorFilter processorFilter) {
        if (record == null) {
            return null;
        }

        return new ProcessorTask(
                record.getId(),
                record.getVersion(),
                record.getMetaId(),
                record.getData(),
                nodeName,
                feedName,
                record.getCreateTimeMs(),
                record.getStatusTimeMs(),
                record.getStartTimeMs(),
                record.getEndTimeMs(),
                TaskStatus.PRIMITIVE_VALUE_CONVERTER.fromPrimitiveValue(record.getStatus()),
                processorFilter);
    }
Count the current number of tasks for a filter matching the specified status.

@param filterId The filter to count tasks for.
@param status   Task status.
@return The number of tasks matching the specified status.
stroom-processor/stroom-processor-impl-db/src/main/java/stroom/processor/impl/db/ProcessorTaskDaoImpl.java