mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-11-04 02:42:56 +00:00 
			
		
		
		
	Conform new fsm_update API
This commit is contained in:
		@@ -86,14 +86,15 @@ class MessageFSMStepsEventHandler(FSMAwareEventHandler):
 | 
			
		||||
    def handle_event(self, message):
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
    def handle_fsm_step(self, from_state, to_state, trigger):
 | 
			
		||||
    def handle_fsm_step(self, **kwargs):
 | 
			
		||||
        """
 | 
			
		||||
        When the FSM steps this method is invoked.
 | 
			
		||||
        Receives a 'data' field from an fsm_update message as kwargs.
 | 
			
		||||
        """
 | 
			
		||||
        MessageSender().send(
 | 
			
		||||
            'FSM info',
 | 
			
		||||
            f'FSM has stepped from state "{from_state}" '
 | 
			
		||||
            f'to state "{to_state}" in response to trigger "{trigger}"'
 | 
			
		||||
            f'FSM has stepped from state "{kwargs["last_event"]["from_state"]}" '
 | 
			
		||||
            f'to state "{kwargs["current_state"]}" in response to trigger "{kwargs["last_event"]["trigger"]}"'
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user