Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Bug : Showcase Sample #1095

Closed
gpadbidri opened this issue Apr 25, 2023 · 1 comment
Closed

Potential Bug : Showcase Sample #1095

gpadbidri opened this issue Apr 25, 2023 · 1 comment
Labels
type/question Is a plain question

Comments

@gpadbidri
Copy link

gpadbidri commented Apr 25, 2023

https://github.com/spring-projects/spring-statemachine/blob/main/spring-statemachine-samples/showcase/src/main/java/demo/showcase/Application.java

Line No 86 should the source be States.S0 as the initial is set to S0 or the workflow wouldnt just kickstart ?

.withExternal() .**source(States.S1).**target(States.S1).event(Events.A) .guard(foo1Guard()) .and()

Meaning why would the source and target be the same ?

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Apr 25, 2023
@jvalkeal jvalkeal added type/question Is a plain question and removed status/need-triage Team needs to triage and take a first look labels Oct 16, 2023
@jvalkeal
Copy link
Contributor

Sample section for this in docs has a statechart. It's indeed a valid transition while most of a cases not really useful. It mostly exists because you can do transition between sub/parent states and there's a difference for External versus Local Transitions what comes for actual entry/exit and their possible actions. This all is coming from UML specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question Is a plain question
Projects
None yet
Development

No branches or pull requests

2 participants