Generate production quality code from state diagrams created with DrawIO Desktop#
SinelaboreRT can generate state machine code from DrawIO desktop models using supported UML palette elements.
Quick Start#
Use the microwave example from the examples folder and regenerate code from a .drawio model.
java -cp "pathToCodegenJarFolder/*" codegen.Main -p drawio -l cx -o oven oven.drawioSupported Elements#
- Normal and hierarchical states
- Deep/flat history (
(H*),(H)in state names) - Initial and final states
- Signal events (name, guard, action)
- Choice and comments
Example Diagrams#


How-To Notes#
- Connect transitions on the light-green anchor points on state borders.
- Enter guards on outgoing choice transitions in square brackets.
- Use
-tto select a specific diagram by name if needed.