menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Statecharts

The Statecharts community on Spectrum is (along with spectrum) MOVING TO OTHER PLATFORMS: For statecharts discussions in general go to Statecharts Discussion on GitHub (link) or Gitter (link). For XState-specific questions, go to the XState discussion forum for Q&A or the Stately discord chat to chat.

Channels
Team

Does XState support the UML equivalent of EntryPoints and ExitPoints?

September 24, 2020 at 7:56am

Does XState support the UML equivalent of EntryPoints and ExitPoints?

September 24, 2020 at 7:56am

September 24, 2020 at 4:15pm
These aren't explicitly supported in SCXML; what is your use-case?
A SubState can have many reasons why it is final internally. But with final only one outgoing default transition can be defined (onDone by xState). With ExitPoints different following states can be defined depending on the reason for finalization.
EntryPoints can help to use substates more flexible. So alternative initial transitions can be defined. Depending on which state and via which EntryPoint the Substate is entered. Currently only one default transition can be defined, analogous to the final.

September 26, 2020 at 5:50pm
It's true. Named EntryPoints and ExitPoints are not supported in SCXML format. Is it possible in xState to make a transition from a substate to a parent state or even to a lower substate outside the state? Is it possible to perform any transitions that are not restricted to the current state context? Then Namend EntryPoints and ExitPoints would not be necessary.

September 27, 2020 at 4:13am
Is it possible in xState to make a transition from a substate to a parent state or even to a lower substate outside the state?
Yes - you can always target a state node by its id to transition to any arbitrary state node.