code: function defineProcessBatchTask() {
      const taskDef = TaskDef.defineTask(processBatch.name, processBatch, batchAndCancellableSettings);
      taskDef.defineSubTask(executeAllProcessOneTasks.name, executeAllProcessOneTasks, batchAndCancellableSettings);
      taskDef.defineSubTask(executeAllProcessAllTasks.name, executeAllProcessAllTasks, batchAndCancellableSettings);
      taskDef.defineSubTask(discardUnusableRecords.name, discardUnusableRecords, batchAndUnusableRecordsSettings);
      taskDef.defineSubTask(preFinaliseBatch.name, preFinaliseBatch, batchSettings);
      return taskDef;
    }
docs: Defines the process batch task (and its sub-tasks) to be used to track the state of the processing phase.
  @returns {ProcessBatchTaskDef} a new process batch task definition (with its sub-task definitions)