This tutorial (
tutorial-4) is specific to draw.io. If you prefer PlantUML, check out tutorial-3.
The first design we will look at is a small Hierarchical State Machine (HSM) that represents the state of Mario in a game.
As you complete the lessons in this tutorial, you'll be able to interact with the generated state machines in your web browser. One of the later lessons will be programming language specific.
You should download the full contents of this tutorial to your computer so that you can follow along with the examples and complete the exercises.
Click here, or click the green "Code" button at the top of the Github page and select "Download ZIP".
Then unzip the contents to a location on your computer where you can easily access them.
There are two main ways to run the StateSmith CLI:
- Download the pre-built binary for your computer (no need for dotnet, no need to install anything).
- Install the StateSmith CLI using the dotnet SDK.
Follow the instructions here for the method that you prefer.
Let's test the StateSmith CLI to make sure it is working. Run the following command in your terminal:
ss.cli --versionYou should see output similar to the following:
Using settings directory: /home/afk/.config/StateSmith.Cli
StateSmith.Cli 0.14.0+4a4e30018e9a371124530fa96cf2ba3322b80459
Make sure the version is at least 0.11.0. I generally recommend using the latest version available.
We will cover the most important commands in this tutorial, but if you are curious, you can find additional usage information here.
I recommend downloading the official desktop version of draw.io from https://www.drawio.com/ (which links to their github releases page).
.drawio.svg files as the extension has numerous bugs with them. It is a pretty good extension for .drawio files though... usually... am I making you nervous yet? 😅 Best to start with the official draw.io program :)
Navigate to lesson-1 and see the readme there.