docs: function defineFinaliseBatchTask() {
      const taskDef = TaskDef.defineTask(finaliseBatch.name, finaliseBatch, batchAndProcessOutcomesSettings);
      taskDef.defineSubTask(discardAnyRejectedMessages.name, discardAnyRejectedMessages, batchAndCancellableSettings);
      taskDef.defineSubTask(saveBatchState.name, saveBatchState, batchSettings);
      taskDef.defineSubTask(postFinaliseBatch.name, postFinaliseBatch, batchSettings);
      return taskDef;
    }