anchor.diff:      ?FINISHED_STATUS | ?CANCELLED_STATUS | ?FAILED_STATUS | ?INTERRUPTED_STATUS.
   
   -type run_elements() :: #atm_lane_execution_run_elements{}.
  +-type run_diff() :: fun((atm_lane_execution:run()) ->
  +    {ok, atm_lane_execution:run()} | errors:error()
  +).
   -type run() :: #atm_lane_execution_run{}.
   
   -type record() :: #atm_lane_execution{}.
   
  --export_type([status/0, run_elements/0, run/0, record/0]).
  +-export_type([run_elements/0, run_diff/0, run/0]).
  +-export_type([status/0, record/0]).
   
   
   %%%===================================================================
  
positive.code: 
  
  %% @private
  -spec update_curr_run(
      undefined | pos_integer(),
      fun((atm_lane_execution:run()) -> {ok, atm_lane_execution:run()} | errors:error()),
      atm_workflow_execution:record()
  ) ->
      {ok, atm_workflow_execution:record()} | errors:error().
  update_curr_run(GivenLaneIndex, UpdateFun, AtmWorkflowExecution) ->
      update_curr_run(GivenLaneIndex, UpdateFun, undefined, AtmWorkflowExecution).
  
  
  -spec update_curr_run(
      undefined | pos_integer(),
      fun((atm_lane_execution:run()) -> {ok, atm_lane_execution:run()} | errors:error()),
      undefined | atm_lane_execution:run(),
      atm_workflow_execution:record()
  ) ->
      {ok, atm_workflow_execution:record()} | errors:error().
  update_curr_run(GivenLaneIndex, Diff, Default, AtmWorkflowExecution = #atm_workflow_execution{
      lanes = AtmLaneExecutions,
      curr_lane_index = CurrLaneIndex,
      curr_run_no = CurrRunNo
  }) ->
      LaneIndex = utils:ensure_defined(GivenLaneIndex, CurrLaneIndex),
      AtmLaneExecution = #atm_lane_execution{runs = Runs} = lists:nth(LaneIndex, AtmLaneExecutions),
  
      UpdateRunsResult = case Runs of
          [#atm_lane_execution_run{run_no = RunNo} = CurrRun | RestRuns] when
  
negative.code: 
  
  %% @private
  -spec get_schema_id(marker(), atm_workflow_execution:record()) ->
      automation:id().
  get_schema_id(AtmLaneMarker, AtmWorkflowExecution) ->
      AtmLaneExecution = get(AtmLaneMarker, AtmWorkflowExecution),
      AtmLaneExecution#atm_lane_execution.schema_id.
  
  
  %% @private
  -spec get_schema(marker(), atm_workflow_execution:record()) ->
      atm_lane_schema:record().
  get_schema(AtmLaneMarker, AtmWorkflowExecution = #atm_workflow_execution{
      schema_snapshot_id = AtmWorkflowSchemaSnapshotId
  }) ->
      AtmLaneIndex = resolve_index(AtmLaneMarker, AtmWorkflowExecution),
  
      {ok, #document{value = AtmWorkflowSchemaSnapshot}} = atm_workflow_schema_snapshot:get(
          AtmWorkflowSchemaSnapshotId
      ),
      lists:nth(AtmLaneIndex, AtmWorkflowSchemaSnapshot#atm_workflow_schema_snapshot.lanes).
  
  
  -spec get_curr_run(marker(), atm_workflow_execution:record()) ->
      {ok, run()} | errors:error().
  get_curr_run(AtmLaneMarker, AtmWorkflowExecution = #atm_workflow_execution{
      curr_run_no = CurrRunNo
  }) ->
      case get(AtmLaneMarker, AtmWorkflowExecution) of
          #atm_lane_execution{runs = [#atm_lane_execution_run{run_no = undefined} = Run | _]} ->
              {ok, Run};
          #atm_lane_execution{runs = [#atm_lane_execution_run{run_no = CurrRunNo} = Run | _]} ->
  