[docs]classAASFSMBehaviour(FSMBehaviour):""" This class is an extension of the own FMSBehaviour of SPADE, which allows to print the start and the finish of the Finite State Machine. """
[docs]asyncdefon_start(self):"""This method prints that the FSM has started."""_logger.info(f" ** FSM starting at initial state --> {self.current_state}")
[docs]asyncdefon_end(self):"""This method prints that the FSM has stopped and execute the agent-related stopping method."""_logger.info(f" ** FSM finished at state --> {self.current_state}")awaitself.agent.stop()