Only tutorial-2 will be kept up to date with all the best practices and features. I only have so much time for documentation.
The diagram is still good though for experimentation.
Tested on Linux and Windows. Should work on mac as well.
This example uses new StateSmith features that are really helpful:
- draw.io vscode plugin.
- C# script files.
While you don't have to use StateSmith with vscode (you can go pure CLI), it is really handy.
Install dotnet and dotnet-script by following this wiki page.
You'll also want to install the draw.io vscode extension.
To get intellisense for our C# scripts, install the official C# vscode extension.
📢 NOTE! 📢
A recent vscode c# extension update removed omnisharp (which we need)
It's easy to re-enable though: StateSmith/StateSmith#221
You'll also need to run a few terminal commands for vscode to understand C# script files:
dotnet script init delete_me_dummy_file.csx
rm ./delete_me_dummy_file.csx
Then restart vscode and you should be good to go!
Full explanation and details here.
One of the really cool features of draw.io is that the viewable svg file is also the design - as shown below! This is pretty excellent!
The one downside though is that the editable draw.io xml is embedded as binary in the svg. This can be tricky if you have multiple developers changing the svg on different git branches and wanting to merge the changes together. This is a common problem with some other state machine software like Matlab Simulink. You could also choose to use regular XML .drawio files instead of drawio.svg files. This usually isn't an issue we run into at my work.