Alternative approach for EA code-generation-templates. As you know the EA does not generate any C-code for statemachines and the extending of templates for uml behaviors like state machines on your own is very tricky stuff.
Following article describes an alternative approach:
http://blog.lieberlieber.com/2012/11/05/a-custom-uml-state-machine-c-code-generator-in-600-lines/The article provides very good and very short overview for
- Addin-development
- state machine -> code transformation
The described example needs just 600 lines of C# code. As it is a .NET code you can debug it, trace it, what ever you want and not can using EA templates. The described example supports:
- Primitive state machines
- Signal Triggers
- Composite States
- Entry- and Exit-Actions
- Transition Effects
- Decision Nodes