Hi, I built my own FSM based on monitor_demo.py example. While testing, I found that MonitorState class implementation does not take all possible input combinations into consideration. In execute() method of MonitorState class we wait for the first message to be received. Then in _monitorhandler() we generally check the contents of the message (for example using if/elif/else block). There are 3 possible scenarios:
:green_circle: If _monitorhandler() returns outcome which is defined in state's outcomes everything works fine and we go to the next state of FSM.
:red_circle: Transition was declared in _sm.addstate() but we did not consider it in _monitorhandler() (simple code snippet below):
Hi, I built my own FSM based on monitor_demo.py example. While testing, I found that MonitorState class implementation does not take all possible input combinations into consideration. In execute() method of MonitorState class we wait for the first message to be received. Then in _monitorhandler() we generally check the contents of the message (for example using if/elif/else block). There are 3 possible scenarios:
In this case _monitorhandler() returns
None
and following Exception is being raised:None
and Exception is being raised: