In my case, when I want to use a state machine for a project, I usually go with Quantum Leaps [1] tools. Nowadays their website seems cluttered and management-focused, but the tech is solid and the tools are very robust.
They also distribute a book [2] on how to use the model using their framework as an example, and I even implemented my version of it as an exercise years ago.
It does not have (or did not, I haven't checked in the last few years) a tool to translate from XMI to their framework, but they have a freeware to draw the chart. Frankly, I have not even used it: I draw the state machine using some editor and it is easy enough to translate to code and maintain. Maybe not the best, but up until now, very nice to deal with the limited complexity of most embedded systems.
[1] https://www.state-machine.com/doc/concepts#HSM [2] https://www.state-machine.com/psicc2/