This is becoming the new current state.
554704
def enter_state(self, request, application):
        
        authorised_persons = self.get_email_persons(application)
        link, is_secret = self.get_request_email_link(application)
        emails.send_request_email(
            self.authorised_text,
            self.authorised_role,
            authorised_persons,
            application,
            link, is_secret)
437207
private void setState(State newState) {
        m_logger.debug("Entering state: {}", newState.toString());
        synchronized (m_stateChangeLock) {
            m_state = newState;
            m_stateChangeLock.notifyAll();
        }
    }
1343374
def switch(self):
        
        self._status = (self._status + 1) % len(self.states)
        self.status(self._status)
1155437
private void createNewState(AbstractBaseDTNode<I, D> newNode) {
        TTTTransition<I, D> newTreeTrans = newNode.getIncoming().choose();
        assert newTreeTrans != null;

        TTTState<I, D> newState = createState(newTreeTrans);
        link(newNode, newState);
        initializeState(newState);
    }
550649
public function getState(){
		$this->loadCurrent();
		
		return new State($this->document, $this->translator, $this->current);
	}
476891
function()
	{
		if ( this.state == CKEDITOR.TRISTATE_OFF )
			this.setState( CKEDITOR.TRISTATE_ON );
		else if ( this.state == CKEDITOR.TRISTATE_ON )
			this.setState( CKEDITOR.TRISTATE_OFF );
	}
1243028
function () {
      if (this.state) {
        _routerUtils.forEach(this.state.handlerInfos.slice().reverse(), function (handlerInfo) {
          var handler = handlerInfo.handler;
          _routerUtils.callHook(handler, 'exit');
        });
      }

      this.state = new _routerTransitionState.default();
      this.currentHandlerInfos = null;
    }
305244
def change_state(self, state):
        """"""
        if state is not self.state:
            if self.debug:
                self.print_debug(b'state => ' + STATE_NAMES[state].encode())
            if self.state is STATE_NOT_STARTED:
                self.read_in_state_not_started = b''
            self.state = state
1320653
public void setState(S state){
		Integer id = definition.getStateId(state);
		currentStateId.set(id);
	}
1232474
function pushTextState( $newState )
    {
        $this->textStateStack[] = $this->currentTextState;
        $this->currentTextState = $newState;
        $this->setCurrentFont();
    }
899714
private void pushState(final S state) {
        this.state = state;

        header.setHTML(TEMPLATE.header(currentStep().getTitle()));
        clearError();
        body.showWidget(state); // will call onShow(C) for the current step
        footer.back.setEnabled(state != initialState());
        footer.next
                .setHTML(
                        lastStates().contains(state) ? CONSTANTS.common_label_finish() : CONSTANTS.common_label_next());
    }
523312
function() {
    this._super();

    set(this, 'stateMeta', Ember.Map.create());

    var initialState = get(this, 'initialState');

    if (!initialState && get(this, 'states.start')) {
      initialState = 'start';
    }

    if (initialState) {
      this.transitionTo(initialState);
      Ember.assert('Failed to transition to initial state "' + initialState + '"', !!get(this, 'currentState'));
    }
  }
306177
private void updateState(final TaskStatus.State state) {
    statusUpdater.setState(state);
    // Commit and push a new status
    try {
      statusUpdater.update();
    } catch (InterruptedException e) {
      // TODO: propagate interrupt instead?
      Thread.currentThread().interrupt();
    }
  }
199653
public function addState($state)
    {
        $this->_states[$state] = $state;

        if ($this->_currentState === null) {
            $this->_currentState = $state;
        }
    }
874185
def state(self, state=vanilla.message.NoState):
        
        return vanilla.message.State(self, state=state)
827325
public static void ensureCurrentState(Service.STATE state,
                                        Service.STATE expectedState) {
    if (state != expectedState) {
      throw new IllegalStateException("For this operation, the " +
                                          "current service state must be "
                                          + expectedState
                                          + " instead of " + state);
    }
  }
516727
function() {
        var current = this.previousStack.shift();
        var state = this.previousStack.shift();
        if(state != undefined) {
            this.nextStack.unshift(current);
            this.previousStack.unshift(state);
            this.restoring = true;
            this.restore(state);
            this.restoring = false;
            this.onNextChange(this.nextStack[0], this.nextStack.length);
            this.onPreviousChange(
                this.previousStack[1], this.previousStack.length - 1
            );
        } else {
            this.previousStack.unshift(current);
        }
        return state;
    }