xstate-python icon indicating copy to clipboard operation
xstate-python copied to clipboard

Eventless ("Always") Transitions are not supported

Open auphofBSF opened this issue 4 years ago • 1 comments

Implementing the unit tests history_statein.py in #49 highlighted that eventless transitions always is yet to be implemented in xstate-python

The unit tests test_history_should_go_to_the_most_recently_visited_state_by_a_transient_transition_non_interpreter is suppressed in commit:785d2bd

In the commit cf25c7d support has been added to test for unsupported events and the appropriate logging and exception raising, and to handle events to states with custom id's https://xstate.js.org/docs/guides/ids.html#custom-ids

In #49 commit 5893129 the StateNode object support has been copied from XStateJS 4 for transition determination and formatting but has not been checked/debugged. Possible support can be found in functions get_transitions and format_transitions and validate_arrayified_transitions

docs ref: https://xstate.js.org/docs/guides/transitions.html#eventless-always-transitions https://xstate.js.org/docs/guides/transitions.html#transient-transitions

relevant discussion: #49

Suggest this be labeled as Feature Request

auphofBSF avatar Oct 13 '21 02:10 auphofBSF

The SCXML tests are more important for this - let's prioritize eventless transitions before the always: ... sugar.

davidkpiano avatar Oct 13 '21 02:10 davidkpiano