anchor.diff:              do_submit_tasks_in(Mode, [TaskId|Rest], S1, NFailuresAllowed)
       end.
   
  +-spec do_submit_tasks_in(submit_mode(), [task_id()], state(), non_neg_integer()) -> state().
   do_submit_tasks_in(Mode, [TaskId | Rest], #state{stage_info = SI,
                                                 data_map   = DataMap,
                                                 next_runid = RunId,
  
positive.code:     S2 = do_next_stage(Stage, S1),
      maybe_start_pending(S2).
  
  maybe_event_stage_done(Stage, #state{pipeline = P, stage_info = SI} = S) ->
      case can_finish(P, Stage, SI) of
          true -> event_stage_done(Stage, S);
  
negative.code:     S#state{data_map = DataMap}.
  
  
  -spec do_submit_tasks(submit_mode(), [task_id()], state(), non_neg_integer()) -> state().
  do_submit_tasks(_Mode, [], S, _) -> S;
  do_submit_tasks(Mode, [TaskId | Rest], #state{stage_info = SI,
                                                pipeline   = P,
  