code: private boolean transitionState(ExecutionState currentState, ExecutionState newState, Throwable cause) {
  		if (STATE_UPDATER.compareAndSet(this, currentState, newState)) {
  			if (cause == null) {
  				LOG.info("{} ({}) switched from {} to {}.", taskNameWithSubtask, executionId, currentState, newState);
  			} else {
  				LOG.info("{} ({}) switched from {} to {}.", taskNameWithSubtask, executionId, currentState, newState, cause);
  			}
  
  			return true;
  		} else {
  			return false;
  		}
  	}
docs: Try to transition the execution state from the current state to the new state.
  
  @param currentState of the execution
  @param newState of the execution
  @param cause of the transition change or null
  @return true if the transition was successful, otherwise false