Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Legacy State Machine Templates
Code generation operates using a set of generation templates. From Release 11.0 of Enterprise Architect, a different set of templates are available as the default for software code generation from a State Machine diagram into Java, C, ANSI C++ or C# code. You can still use the original templates, as described here, for models developed in earlier releases of Enterprise Architect, if you do not want to upgrade them for the new template facilities.
Switch Between Legacy and Release 11 templates
Access Project | Settings | Project Options | Source Code Engineering | <language name>
If necessary, expand the 'Statemachine Engineering (for current model)' grouping and set the 'Use the new Statemachine Template' option to True (to use the later templates) or False (to use the Legacy templates).
Legacy Template Transformations
A State Machine in a Class internally generates a number of constructs in software languages to provide effective execution of the States' behaviors (do, entry and exit) and also to code the appropriate transition's effect when necessary.
Model Objects |
Code Objects |
See also |
---|---|---|
Enumerations |
|
|
Attributes |
|
|
Operations |
|
Operation Behavior |
Notes
- To be able to generate code from behavioral models, all behavioral constructs should be contained within a Class
Learn more
- State Machine Diagrams
- Java Code Generated From Legacy State Machine Template
- Generate From Behavioral Models
- State Machine Modeling For HDLs
Learning Center topics
- Alt+F1 | Enterprise Architect | Software Engineering | Behavioral Code Generation | State Machines