def get_start_state(self, set_final_outcome=False):
        """Get the start state of the container state

        :param set_final_outcome: if the final_outcome of the state should be set if the income directly connects to
                                    an outcome
        :return: the start state
        """

        # overwrite the start state in the case that a specific start state is specific e.g. by start_from_state
        if self.get_path() in state_machine_execution_engine.start_state_paths:
            for state_id, state in self.states.items():
                if state.get_path() in state_machine_execution_engine.start_state_paths:
                    state_machine_execution_engine.start_state_paths.remove(self.get_path())
                    self._start_state_modified = True
                    return state

        if self.start_state_id is None:
            return None

        # It is possible to connect the income directly with an outcome
        if self.start_state_id == self.state_id:
            if set_final_outcome:
                for transition_id in self.transitions:
                    # the transition of which the from state is None is the transition that directly connects the income
                    if self.transitions[transition_id].from_state is None:
                        to_outcome_id = self.transitions[transition_id].to_outcome
                        self.final_outcome = self.outcomes[to_outcome_id]
                        break
            return self

        return self.states[self.start_state_id]
def get_start_state ( self , set_final_outcome = False ) : if self . get_path ( ) in state_machine_execution_engine . start_state_paths : for state_id , state in self . states . items ( ) : if state . get_path ( ) in state_machine_execution_engine . start_state_paths : state_machine_execution_engine . start_state_paths . remove ( self . get_path ( ) ) self . _start_state_modified = True return state if self . start_state_id is None : return None if self . start_state_id == self . state_id : if set_final_outcome : for transition_id in self . transitions : if self . transitions [ transition_id ] . from_state is None : to_outcome_id = self . transitions [ transition_id ] . to_outcome self . final_outcome = self . outcomes [ to_outcome_id ] break return self return self . states [ self . start_state_id ]
Get the start state of the container state

        :param set_final_outcome: if the final_outcome of the state should be set if the income directly connects to
                                    an outcome
        :return: the start state