-
Notifications
You must be signed in to change notification settings - Fork 44
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
History child of parallel state not rendering correctly #112
Comments
hi @joeriexelmans thanks for raising this issue - it seems you've bumped into a bug. I've reproduced it and have found a likely root cause. I hope to fix it over the coming days - I'll keep you posted in this thread. |
@joeriexelmans Found a fix quicker than anticipated - I've put it up on https://sverweij.gitlab.io/state-machine-cat/ and published it on npm with the beta tag ( => Could you verify if it works for your original use case as well? I'll publish to the regular npm/ state-machine-cat.js.org and the atom package later this week. B.t.w. Thanks for your excellent bug description - it helped a lot in narrowing down the fix. Your example now renders like this: |
Hi @sverweij ! Thank you very much for the quick response. |
hi @joeriexelmans thanks for testing & getting back! I've published version 6.0.4 to npm and state-machine-cat.js.org (the atom package will follow later) |
@sverweij By the way, if you are interested in a bunch of statecharts that I rendered, you can have a look at this directory of this branch of this repository: The project I'm working on is my master thesis: A statechart interpreter with configurable semantic variability (see http://msdl.cs.mcgill.ca/people/joeri/10_Thesis). The input format uses XML and based on SCXML, but differs in some ways. To render statecharts, the input format is loaded to an internal state tree representation (which serves as input to the interpreter), and this tree is then converted to your 'smcat' format in a dirty script. Statecharts written in XML are difficult to read, especially since I'm dealing with many different XML files that serve as tests to the interpreter. It's a huge help being able to render my statecharts. |
@joeriexelmans o wow that looks like cool master thesis. Thanks for sharing this! render.py is the conversion script? I'm still looking for an alternative to GraphViz that has the capabilities needed for state machines, but that look better (so pretty OK gets to wow that's nice!) and have better native web support. |
Expected Behavior
In the following state machine:
The history state is expected to show up as a child of the parallel state...
Current Behavior
Instead, the history state is rendered incorrectly and shows up next to the parallel state:
If the history state is not mentioned in any transition, it is not rendered at all.
Steps to Reproduce (for bugs)
Whenever a parallel state has a history child, the problem occurs.
Context
For my purposes, history states should be allowed to be children of parallel states.
Your Environment
Ubuntu 19.10.
state-machine-cat 6.0.1 from NPM.
Node 10.15.2 (from Ubuntu repository)
Exact same problem with the online version: https://state-machine-cat.js.org/
The text was updated successfully, but these errors were encountered: