class CMDx::Batch

def call

def call
  self.class.batch_groups.each do |group|
    next unless __cmdx_eval(group.options)
    batch_halt = group.options[:batch_halt] || task_setting(:batch_halt)
    group.tasks.each do |task|
      task_result = task.call(context)
      next unless Array(batch_halt).include?(task_result.status)
      throw!(task_result)
    end
  end
end