I've tried to delete some process instances with a special delete reason. But I cannot find my reason in the database as I expected.
TaskManager.deleteTasksByProcessInstanceId(String processInstanceId, String deleteReason, boolean cascade) forgets the deleteReason and deletes each task with TaskEntity.DELETE_REASON_DELETED.