anchor.diff:      AtmTaskExecutionId,
       NewAtmTaskExecutionStatus
   ) ->
  +    HasTaskStarted = lists:member(NewAtmTaskExecutionStatus, [?ACTIVE_STATUS, ?SKIPPED_STATUS]),
  +
       Diff = fun(AtmWorkflowExecution) ->
  -        update_runs_at_lane(
  -            AtmLaneIndex,
  -            fun handle_task_status_change_in_current_run/4,
  -            [AtmParallelBoxIndex, AtmTaskExecutionId, NewAtmTaskExecutionStatus],
  -            AtmWorkflowExecution
  -        )
  +        atm_lane_execution:update_curr_run(AtmLaneIndex, fun(Run) ->
  +            AtmParallelBoxExecutions = Run#atm_lane_execution_run.parallel_boxes,
  +            AtmParallelBoxExecution = lists:nth(AtmParallelBoxIndex, AtmParallelBoxExecutions),
  +
  +            case atm_parallel_box_execution:update_task_status(
  +                AtmTaskExecutionId, NewAtmTaskExecutionStatus, AtmParallelBoxExecution
  +            ) of
  +                {ok, NewParallelBoxExecution} ->
  +                    {ok, Run#atm_lane_execution_run{
  +                        status = case {Run#atm_lane_execution_run.status, HasTaskStarted} of
  +                            {?ENQUEUED_STATUS, true} ->
  +                                ?ACTIVE_STATUS;
  +                            {CurrentStatus, _} ->
  +                                CurrentStatus
  +                        end,
  +                        parallel_boxes = lists_utils:replace_at(
  +                            NewParallelBoxExecution, AtmParallelBoxIndex, AtmParallelBoxExecutions
  +                        )
  +                    }};
  +                {error, _} = Error ->
  +                    Error
  +            end
  +        end, AtmWorkflowExecution)
       end,
       atm_workflow_execution_status:handle_lane_task_status_change(AtmWorkflowExecutionId, Diff).
   
  
positive.code: status_to_phase(?ACTIVE_STATUS) -> ?ONGOING_PHASE;
  status_to_phase(?ABORTING_STATUS) -> ?ONGOING_PHASE;
  status_to_phase(?FINISHED_STATUS) -> ?ENDED_PHASE;
  status_to_phase(?SKIPPED_STATUS) -> ?ENDED_PHASE;
  status_to_phase(?CANCELLED_STATUS) -> ?ENDED_PHASE;
  status_to_phase(?FAILED_STATUS) -> ?ENDED_PHASE.
  
  
  -spec handle_preparing(pos_integer(), atm_workflow_execution:id()) ->
      atm_workflow_execution:doc() | no_return().
  handle_preparing(AtmLaneIndex, AtmWorkflowExecutionId) ->
      Diff = fun(AtmWorkflowExecution) ->
          update_runs_at_lane(AtmLaneIndex, fun mark_current_run_as_preparing/1, AtmWorkflowExecution)
      end,
      ?extract_atm_workflow_execution_doc(atm_workflow_execution_status:handle_lane_preparing(
          AtmLaneIndex, AtmWorkflowExecutionId, Diff
      )).
  
  
  
negative.code: %%%-------------------------------------------------------------------
  %%% @doc
  %%% This module contains functions that handle atm lane execution run status
  %%% transitions according (with some exceptions described below) to following
  %%% state machine:
  %%%
  %%%               +-------------+   cancel or failure
  %%%               |  SCHEDULED  |------------------------
  