@transaction.commit_on_success
    def transition(self, state, event=None, start_time=None, end_time=None,
            message=None, failed=False, save=True):

        if self.in_transition():
            raise STSError('Cannot start transition while already in one.')

        event = Event.get(event)
        state = State.get(state)

        # No end state, therefore this state will marked as in transition
        # until the transition is finished.
        if state is None or state == State.TRANSITION:
            raise STSError('Cannot create a transition with an empty state.')

        now = timezone.now()

        if start_time is None:
            start_time = now

        if end_time is None:
            end_time = now

        duration = get_duration(start_time, end_time)

        transition = Transition(system=self, event=event, duration=duration,
            state=state, start_time=start_time, end_time=end_time,
            message=message, failed=failed)

        if save:
            transition.save()

        return transition
Create a transition in state. This means of transitioning is the most
dataset/ETHPy150Open chop-dbhi/django-sts/sts/models.py/System.transition