Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Setup for Capturing State Changes

You can generate Sequence diagrams that show transitions in state as a program executes. The illustration below shows a project that has, in its State Machine, a number of States that correspond to stations in the Melbourne underground railway system.

State Sequence Diagram

Showing State transitions on your debug-generated Sequence diagrams is optional; you set an option in the package script associated with the Class for which you intend to record States.


If you do not have a package script for the Class or package you must create one. Sequence diagrams can only be generated for a package that has been configured for debug.

Next, you create a State Machine under the Class. On the State Machine you create the State elements that correspond to any states to be captured for your Class. The debugger evaluates your States by checking constraints on the States you create. The States on this diagram are then used by the debugger and State transitions are incorporated into the diagram.

ProjectView - States

This figure shows the Class CXTrain with a State Machine called Stations. It has a child diagram also called Stations, on which the States {Central,Flinders,Lonsdale...} are placed.