def _check_transition_target(self, transition):
        """Checks the validity of a transition target

        Checks whether the transition target is valid.

        :param rafcon.core.transition.Transition transition: The transition to be checked
        :return bool validity, str message: validity is True, when the transition is valid, False else. message gives
            more information especially if the transition is not valid
        """

        to_state_id = transition.to_state
        to_outcome_id = transition.to_outcome

        if to_state_id == self.state_id:
            if to_outcome_id not in self.outcomes:
                return False, "to_outcome is not existing"
        else:
            if to_state_id not in self.states:
                return False, "to_state is not existing"
            if to_outcome_id is not None:
                return False, "to_outcome must be None as transition goes to child state"

        return True, "valid"
def _check_transition_target ( self , transition ) : to_state_id = transition . to_state to_outcome_id = transition . to_outcome if to_state_id == self . state_id : if to_outcome_id not in self . outcomes : return False , "to_outcome is not existing" else : if to_state_id not in self . states : return False , "to_state is not existing" if to_outcome_id is not None : return False , "to_outcome must be None as transition goes to child state" return True , "valid"
Checks the validity of a transition target

        Checks whether the transition target is valid.

        :param rafcon.core.transition.Transition transition: The transition to be checked
        :return bool validity, str message: validity is True, when the transition is valid, False else. message gives
            more information especially if the transition is not valid