anchor.diff:  -export([
       get_schema_id/2,
       get_schema/2,
  -    get_curr_run/2
  +
  +    get_curr_run/2,
  +    update_curr_run/3, update_curr_run/4
   ]).
  --export([update_curr_run/3, update_curr_run/4]).
  +-export([get/2]).
   -export([to_json/1]).
   
   %% persistent_record callbacks
   -export([version/0, upgrade_encoded_record/2, db_encode/2, db_decode/2]).
   
  +
  +-type index() :: pos_integer().
  +% Indicates specific atm lane execution either directly using index() or indirectly
  +% using 'undefined' which means currently (or last in case of ended atm workflow
  +% execution) executed atm lane execution.
  +-type marker() :: undefined | index().
   
   -type status() ::
       ?SCHEDULED_STATUS | ?PREPARING_STATUS | ?ENQUEUED_STATUS |
  
positive.code:             NestedRecordDecoder(AtmParallelBoxExecutionJson, atm_parallel_box_execution)
          end, AtmParallelBoxExecutionsJson)
      }.
  
negative.code: 
  
  %% @private
  -spec update_curr_run(marker(), run_diff(), atm_workflow_execution:record()) ->
      {ok, atm_workflow_execution:record()} | errors:error().
  update_curr_run(AtmLaneMarker, UpdateFun, AtmWorkflowExecution) ->
      update_curr_run(AtmLaneMarker, UpdateFun, undefined, AtmWorkflowExecution).
  
  
  -spec update_curr_run(
      marker(),
      run_diff(),
      undefined | atm_lane_execution:run(),
      atm_workflow_execution:record()
  ) ->
      {ok, atm_workflow_execution:record()} | errors:error().
  update_curr_run(AtmLaneMarker, Diff, Default, AtmWorkflowExecution = #atm_workflow_execution{
      lanes = AtmLaneExecutions,
      curr_run_no = CurrRunNo
  }) ->
      AtmLaneIndex = resolve_index(AtmLaneMarker, AtmWorkflowExecution),
      AtmLaneExecution = #atm_lane_execution{runs = Runs} = lists:nth(AtmLaneIndex, AtmLaneExecutions),
  
      UpdateRunsResult = case Runs of
          [#atm_lane_execution_run{run_no = RunNo} = CurrRun | RestRuns] when
  