anchor.diff:      atm_workflow_execution:doc() | no_return().
   mark_as_preparing(AtmLaneIndex, AtmWorkflowExecutionId) ->
       Diff = fun(#atm_workflow_execution{lanes = AtmLaneExecutions} = AtmWorkflowExecution) ->
  +        % TODO check that workflow in ongoing/is not aborting; maybe change workflow status to active?
           AtmLaneExecution = lists:nth(AtmLaneIndex, AtmLaneExecutions),
   
           case mark_current_run_as_preparing(AtmLaneExecution#atm_lane_execution_rec.runs) of
  
positive.code: 
  
  %% @private
  -spec create_exception_store(create_ctx()) ->
      create_ctx().
  create_exception_store(AtmLaneExecutionCreateCtx = #atm_lane_execution_create_ctx{
      workflow_execution_ctx = AtmWorkflowExecutionCtx,
      workflow_execution_env = AtmWorkflowExecutionEnv,
  
negative.code:             {ok, [NewRun | PreviousRuns]};
          _ ->
              ?ERROR_ATM_INVALID_STATUS_TRANSITION(Status, ?PREPARING_STATUS)
      end.
  
  
  %% @private
  -spec create_lane(pos_integer(), atm_workflow_execution:doc(), atm_workflow_execution_ctx:record()) ->
      {atm_workflow_execution:doc(), atm_workflow_execution_env:record()}.
  create_lane(AtmLaneIndex, AtmWorkflowExecutionDoc, AtmWorkflowExecutionCtx) ->
      AtmLaneExecutionCreateCtx = #atm_lane_execution_create_ctx{
          workflow_execution_env = AtmWorkflowExecutionEnv,
          iterated_store_id = IteratedStoreId,
          exception_store_id = ExceptionStoreId,
          parallel_boxes = AtmParallelBoxExecutions
      } = create_execution_elements(build_lane_execution_create_ctx(
          AtmLaneIndex, AtmWorkflowExecutionDoc, AtmWorkflowExecutionCtx
      )),
  
      Diff = fun(#atm_workflow_execution{lanes = AtmLaneExecutions} = AtmWorkflowExecution) ->
          #atm_lane_execution_rec{runs = [CurrRun | PrevRuns]} = AtmLaneExecution = lists:nth(
              AtmLaneIndex, AtmLaneExecutions
          ),
          case CurrRun of
              #atm_lane_execution_run{
                  status = ?PREPARING_STATUS,
                  exception_store_id = undefined,
                  parallel_boxes = []
              } ->
                  UpdatedCurrRun = CurrRun#atm_lane_execution_run{
                      iterated_store_id = IteratedStoreId,
                      exception_store_id = ExceptionStoreId,
                      parallel_boxes = AtmParallelBoxExecutions
                  },
                  NewAtmLaneExecution = AtmLaneExecution#atm_lane_execution_rec{
                      runs = [UpdatedCurrRun | PrevRuns]
                  },
                  NewAtmLaneExecutions = lists_utils:replace_at(
                      NewAtmLaneExecution, AtmLaneIndex, AtmLaneExecutions
                  ),
                  {ok, AtmWorkflowExecution#atm_workflow_execution{lanes = NewAtmLaneExecutions}};
              _ ->
                  ?ERROR_ALREADY_EXISTS
          end
      end,
      case atm_workflow_execution:update(AtmWorkflowExecutionDoc#document.key, Diff) of
          {ok, AtmWorkflowExecutionDoc} ->
              {AtmWorkflowExecutionDoc, AtmWorkflowExecutionEnv};
          ?ERROR_ALREADY_EXISTS = Error ->
              delete_execution_elements(AtmLaneExecutionCreateCtx),
              throw(Error)
      end.
  
  
  