Moves to next phase if transition that ended matches one of phase triggers.
761094
function handleTransitionEnd(priv, evt) {
  if (evt.propertyName in priv.phaseTriggers &&
      priv.phaseTriggers[evt.propertyName].indexOf(evt.target) !== -1) {
    nextPhase(priv);
  }
}
885972
def transition_to_rollback_complete(self):
        """"""
        assert self.state in [AQStateMachineStates.rollback]
        self.state = AQStateMachineStates.rollback_complate
1072160
def step(self):
        """"""
        if self.cancelled or self.finished:
            return

        if not self.pwm_stages:
            self._finish()
            return

        if self.duration == 0:
            progress = 1
        else:
            run_time = time.time() - self._start_time
            progress = max(0, min(1, run_time / self.duration))
        self.stage_index = math.ceil((len(self.pwm_stages) - 1) * progress)
        stage = self.pwm_stages[self.stage_index]
        self._driver.set_pwm(stage)

        if progress == 1:
            self._finish()
776293
public void finishTransitionImmediately() {
    mTransitionState = TRANSITION_NONE;
    for (int i = 0; i < mLayers.length; i++) {
      mAlphas[i] = mIsLayerOn[i] ? 255 : 0;
    }
    invalidateSelf();
  }
986983
private void advanceRunState(int targetState) {
        // assert targetState == SHUTDOWN || targetState == STOP;
        for (;;) {
            int c = ctl.get();
            if (runStateAtLeast(c, targetState) ||
                ctl.compareAndSet(c, ctlOf(targetState, workerCountOf(c))))
                break;
        }
    }
880709
public Transition getTransition(Long fromId, Integer eventType, String completionCode) {
        Transition ret = null;
        for (Transition transition : getTransitions()) {
            if (transition.getFromId().equals(fromId)
                    && transition.match(eventType, completionCode)) {
                if (ret == null) ret = transition;
                else {
                    throw new IllegalStateException("Multiple matching work transitions when one expected:\n"
                            + " processId: " + getId() + " fromId: " + fromId + " eventType: "
                            + eventType + "compCode: " + completionCode);
                }
            }
        }
        return ret;
    }
553093
private void ProcessNextStep() {

        switch (iSelectionStep) {

            case SELECT_SOURCE_CATALOG :
            case SELECT_DEST_CATALOG :
                if (CatalogToSelect()) {
                    fMain.show();

                    return;
                }
                break;

            case SELECT_DEST_SCHEMA :
            case SELECT_SOURCE_SCHEMA :
                if (SchemaToSelect()) {
                    fMain.show();

                    return;
                }
                break;

            case SELECT_SOURCE_TABLES :
                if (iTransferMode == TRFM_TRANSFER) {
                    bStart.setLabel("Start Transfer");
                } else if (iTransferMode == TRFM_DUMP) {
                    bStart.setLabel("Start Dump");
                } else if (iTransferMode == TRFM_RESTORE) {
                    bStart.setLabel("Start Restore");
                }

                bStart.invalidate();
                bStart.setEnabled(false);
                lTable.setMultipleMode(false);
                RefreshMainDisplay();
                break;

            default :
                break;
        }
    }
781926
def recently_walked?(transition)
        transitions = self
        if @target && @target != to_name && target_transition = detect {|t| t.to_name == @target}
          transitions = transitions[index(target_transition) + 1..-1]
        end
        transitions.include?(transition)
      end
485172
def has_transition(self, state):
        
        if state in self.transitions:
            return True

        if '*' in self.transitions:
            return True

        if '+' in self.transitions and self.transitions['+'].target != state:
            return True

        return False
961235
function() {
        var done = true,
            anim;
        for (anim in Transition._running) {
            if (Transition._running[anim]._runFrame) {
                done = false;
                Transition._running[anim]._runFrame();
            }
        }

        if (done) {
            Transition._stopTimer();
        }
    }
1184531
public synchronized void transitionEvent(boolean isEmpty)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "transitionEvent", new Object[]{ new Boolean(isEmpty)});

    if(isEmpty)
    {
      transition--;
    }
    else
    {
      transition++;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "transitionEvent", new Integer(transition));
  }
682168
function onNextTransform (transform, next) {
      // check if we should handle this filePath
      function shouldProcess (filePath, done) {
        done(!!multimatch(filePath, transform.pattern, transform.opts).length)
      }

      // transform the path
      function process (filePath, complete) {
        var filename = path.basename(filePath),
            pathParts = path.dirname(filePath).split(path.sep)

        // we'll get an empty arrary if we overslice
        pathParts = pathParts.slice(transform.by)
        pathParts.push(filename)

        var newPath = pathParts.join(path.sep),
            fileData = files[filePath]

        // don't need the old fileData anymore,
        // since we are re-adding with the new path
        delete files[filePath]
        files[newPath] = fileData

        complete()
      }

      // we do this for each option as the last may have modified the collection
      async.filter(Object.keys(files), shouldProcess, function (results) {
        async.each(results, process, next)
      })
    }
1355675
public StateMachine<T> next(T nextState) throws IllegalStateException {
        Set<T> allowed = transitions.get(currentState);
        checkNotNull(allowed, "No transitions from state " + currentState);
        checkState(allowed.contains(nextState), "Transition not allowed from state " + currentState + " to " + nextState);
        currentState = nextState;
        return this;
    }
432965
@Override
    public void executeNext()
    {
        final LifecycleStage nextStage = getNextStage();
        if (nextStage == null) {
            throw new IllegalStateException("Lifecycle already hit the final stage!");
        }
        execute(nextStage);
    }
281249
def _transition_steps(self, brightness=None):
        
        if brightness is not None:
            self._assert_is_brightness(brightness)
            return self._driver.steps(self.brightness, brightness)

        return 0
183938
def _prepare_transition(self, is_on=None, **kwargs):
        
        # Handle transitions with changing on-off-state
        dest_state = kwargs.copy()
        if is_on is not None:
            if is_on and not self.is_on:
                if 'brightness' not in kwargs or kwargs['brightness'] is None:
                    dest_state['brightness'] = self.brightness
                self.set(brightness=0, cancel_transition=False)
            elif not is_on and self.is_on:
                dest_state['brightness'] = 0

        return dest_state
1287010
public boolean processStep(StepToken scenarioStep, List<StepMacro> macros, boolean alreadymatched) {
        boolean stepMacroMatched = doProcessStep(scenarioStep, macros, 0, alreadymatched);
        return stepMacroMatched;
    }