pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 524 forks source link

Nested initial states don't work when creating a HFSM from another HFSM #510

Closed thedrow closed 3 years ago

thedrow commented 3 years ago

Clone this commit and run the tests: https://github.com/celery/jumpstarter/pull/27/commits/9e161d3e4aba570b5891fa31cf53f8272aa4a38d. I have no idea what happened and in any case, I found a workaround but this should be investigated.

aleneum commented 3 years ago

Here you inherit from AsyncTransition but NestedAsyncTransition is required to resolve nested features such as initial values. Maybe there is more but this fixes test_start at least.

thedrow commented 3 years ago

Indeed that is the problem. Shouldn't we have a typecheck in place?