def execute(self, *args, **kwargs): if PriorityContainer.active_container != self._get_path(): self._parent_active_container = PriorityContainer.active_container PriorityContainer.active_container = self._get_path() outcome = OperatableStateMachine.execute(self, *args, **kwargs) if outcome != self._loopback_name: PriorityContainer.active_container = self._parent_active_container return outcome
def execute(self, *args, **kwargs): if (PriorityContainer.active_container is None or not all(p == PriorityContainer.active_container.split('/')[i] for i, p in enumerate(self._get_path().split('/')))): self._parent_active_container = PriorityContainer.active_container PriorityContainer.active_container = self._get_path() outcome = OperatableStateMachine.execute(self, *args, **kwargs) if outcome != self._loopback_name: PriorityContainer.active_container = self._parent_active_container return outcome
def _build_msg(self, *args, **kwargs): # use state machine _build_msg, not state execute return OperatableStateMachine._build_msg(self, *args, **kwargs)
def _concurrency_execute(self, *args, **kwargs): # use state machine execute, not state execute return OperatableStateMachine.execute(self, *args, **kwargs)