stateMachine icon indicating copy to clipboard operation
stateMachine copied to clipboard

Calling the entry/exit action when transitioning to/from group state

Open mtangy opened this issue 6 years ago • 3 comments

Added capability to call the entry/exit action of a group state when transitioning to and from group states. This is consistent with other state machine frameworks (ex. QT state machine framework )

mtangy avatar Apr 10 '19 20:04 mtangy

Thanks for contributing, Michael! I will have a look shortly. It's been quite a while since I touched this code, so give me a chance to get back into the project. I just want to let you know that I am indeed going to look into your work. At a first glance: You are right, it does make sense to fire group actions. I guess I just never had this specific use case at the time I wrote this.

If you don't mind me asking: Are you currently using this framework for something? I'm asking because it'd be great to have unit tests, but I am not using this framework myself any more. If you have some test cases, be it actual unit tests or anything that would verify this new behaviour, I'd be very grateful! It's hard to judge whether people actually use this code or if it just somehow became popular, but in any case I'd prefer to not introduce (new) bugs. – And sadly I need to focus on other projects at the moment, so I don't have heaps of time at hand.

misje avatar Apr 15 '19 16:04 misje

@misje Thanks for the response! I'm currently using the framework in an embedded application. I would greatly appreciate any feedback you have on the changes I made. I currently don't have any unit tests in place, however I do plan to create some in the near future and will share them as soon as I do.

mtangy avatar Apr 22 '19 13:04 mtangy

If it is multi-level FSM, the fix doesn't work. The fix only call current exit/entry and its parent exit/entry once.

zhijackchen avatar Aug 20 '20 18:08 zhijackchen