@transaction.commit_on_success
    def start_transition(self, event=None, start_time=None, save=True):
        if self.in_transition():
            raise STSError('Cannot start transition while already in one.')

        event = Event.get(event)
        # No end state, therefore this state will marked as in transition
        # until the transition is finished.
        state = State.TRANSITION

        if start_time is None:
            start_time = timezone.now()

        transition = Transition(system=self, event=event, state=state,
            start_time=start_time)

        if save:
            transition.save()

        return transition
Creates and starts a transition if one is not already open.
dataset/ETHPy150Open chop-dbhi/django-sts/sts/models.py/System.start_transition