anchor.diff:      end.
   
   
  --spec handle_lane_enqueued(
  -    atm_workflow_execution:id(),
  -    fun((atm_workflow_execution:record()) -> atm_workflow_execution:record() | errors:error())
  -) ->
  +-spec handle_lane_enqueued(atm_workflow_execution:id(), lane_run_diff()) ->
       {ok, atm_workflow_execution:doc()} | errors:error().
   handle_lane_enqueued(AtmWorkflowExecutionId, AtmLaneExecutionDiff) ->
       atm_workflow_execution:update(AtmWorkflowExecutionId, fun
  
positive.code:     end.
  
  
  -spec handle_lane_task_status_change(
      atm_workflow_execution:id(),
      fun((atm_workflow_execution:record()) -> atm_workflow_execution:record() | errors:error())
  ) ->
      ok | errors:error().
  handle_lane_task_status_change(AtmWorkflowExecutionId, AtmLaneExecutionDiff) ->
      Diff = fun(Record) ->
  
negative.code: -export([handle_ended/1]).
  
  
  % Function taking as argument entire atm_workflow_execution record, modifying lane run
  % and returning updated atm_workflow_execution record (or record)
  -type lane_run_diff() :: fun((atm_workflow_execution:record()) ->
      atm_workflow_execution:record() | errors:error()
  ).
  
  
  %%%===================================================================
  %%% API
  %%%===================================================================
  