-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Feature] Clustering and non-hierarchical state relationships #48
Comments
It should be noted that this is from the possible extensions to the formalism chapter, and not part of the original formalism per se. SCXML and most other have them as explicitly hierarchical, so I'm not too keen on this :) "after 2s" is way higher on my list! Other than that, I haven't experienced the need for it. Yes, there might be portions of a statechart that need to be duplicated (e.g. that α and β arrows need to be duplicated in the C state), I'm thinking that there might be better ways of dealing with that, other than overlapping states. Maybe reusable chunks of const handleAlpha = { "α", "elsewhere1"}
const handleBeta = { "β": "elsewhere2" };
const states = {
A: {
on: handleAlpha,
states: {
B: {}
C: { on: hanldeBeta}
}
}
D: {
on: handleBeta,
states: {
E: {}
F: {}
C: { on: hanldeAlpha}
}
}
} The spread operator could be used to combine many signals. |
That's true - I'll mark this as Documentation so that we can just show how this can be accomplished with ES6. |
I'd still like to support this eventually - although it can be accomplished with ES6 language features, you lose the details of states being related, and that's important meta information to have when visualizing the statecharts. |
I can;t find the reference for the paper but this feature had been investigated by Harel and they discarded it because of the added complexity, the perceived lower readability and the lack of actual use cases. aah found it :
|
Excerpt from the original statecharts paper (emphasis mine):
Proposed API:
🚧 Still being determined. Open to suggestions.
More technical details here: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.221.768&rep=rep1&type=pdf
The text was updated successfully, but these errors were encountered: