Skip to content

Is there a wildcard state syntax to signify all states? #27

Open
@pmi123

Description

Is there a way to express all states as the start of a transition? In other words, if there is a transition that causes all states to go to one single state, how can that be expressed in the transition code? For example, consider a 'reset' transition that makes the state machine go to a Start state regardless of the current state I can write a transition rule from each state to Start using the event reset, but it would be more readable to have something like

state<State.*> {
            on<Event.reset> {
                transitionTo(State.Start)
            }
}

Is there a syntax for something like this?
Thanks!
Mark

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions