How to Reverse Engineer State Machine from .sm?
If you have a state machine definition (.sm) and you want to visualize the state machine with a UML state machine diagram, you can make use of the reverse function to produce the class and state diagram essential to visually represent the definition.
To reverse state machine definition (.sm):
- Select Tools > Code > Reverse State Machine Code... from the toolbar.
- Specify the class, state diagram and the .sm file in the input field. Click OK to continue.
Reverse state machine Field Description Class The controller class for managing the state. Only classes that have a state machine diagrams as sub-diagrams would be listed in the drop down menu. You can select an existing class for managing the state machine. If such a class is not available, leave the option Auto create class model selected. State Diagram The diagram where the state machine definition to be reversed will be visually presented at. State machine diagrams that are sub-diagram of classes are listed in the drop down menu. You can select the one for visualizing the state machine definition or create a new one by selecting Auto create state diagram. Input File The state machine definition (.sm) file to be visualized. An overview of Reverse state machine window
Related Resources
The following resources may help you to learn more about the topic discussed in this page.
2. Generating state machine code | Table of Contents | Chapter 8. Generating REST API |