Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Topic |
Prev | Next |
StateMachines
StateMachines illustrate how an element (often a Class) can move between States, classifying its behavior according to transition triggers and constraining guards.
You generate StateMachine elements and connectors from the 'State' pages of the Diagram Toolbox.
Naming
State Tables
You can display a StateMachine as a diagram, or as a table in one of three relationship formats.
Select the display format
Step |
Action |
See also |
---|---|---|
1 |
Right-click on the diagram background and select the 'Statechart Editor' option. |
|
2 |
Select the appropriate display option:
|
State Machine Table |
Example Diagram
This diagram illustrates some features of StateMachines.
Composite Diagram States
The chain-link symbol in the bottom right corner of the Saved State indicates that it is a State with a Composite diagram.
You have two options for displaying the contents of a State's Composite diagram. Firstly, you can double-click on the parent element to display its child diagram separately, as shown here:
By default, the child diagram displays within a labeled frame that represents the parent object in the context of the child diagram. You can right-click on the background and select the 'Hide Diagram Frame' option to hide the frame, and on the 'Show Diagram Frame' option to show the frame again.
Alternatively, you can right-click on the composite element on the main diagram and select the 'Advanced | Show Composite Diagram' option, which again displays the child diagram in a labeled frame, but this time within the context of the parent diagram.
StateMachine Diagram Element Toolbox Items
Icon |
Description |
See also |
---|---|---|
A State represents a situation where some invariant condition holds; this condition can be static (waiting for an event) or dynamic (performing a set of activities). |
State | |
A StateMachine element is a container for groups of related State elements. |
Statemachine | |
The Initial element represents a pseudo-state used to denote the default state of a Composite State; there can be one Initial vertex in each Region of the Composite State. |
Initial | |
The Activity Final element indicates the completion of an Activity; upon reaching the Final, all execution in the Activity diagram is aborted. |
Final | |
There are two types of History pseudo-states defined in UML: shallow and deep history. |
History | |
A Synch state is useful for indicating that concurrent paths of a StateMachine are synchronized. They are used to split and rejoin periods of parallel processing. |
Synch | |
An Object is a particular instance of a Class at run time. |
Object | |
The Choice pseudo-state is used to compose complex transitional paths, where the outgoing transition path is decided by dynamic, run-time conditions. |
Choice | |
Junction pseudostates are used to design complex transitional paths in StateMachine diagrams. A Junction can be used to combine or merge multiple paths into a shared transition path. |
Junction | |
Entry Point pseudostates are used to define the beginning of a StateMachine. An Entry Point exists for each region, directing the initial concurrent state configuration. |
Entry | |
Exit Points are used in StateMachine elements and StateMachine diagrams to denote the point where the machine is exited and the transition sourcing this exit point. |
Exit | |
The Terminate pseudostate indicates that upon entry of its pseudostate, the StateMachine's execution ends. |
Terminate | |
A Fork/Join element can be used to: 1) split a single flow into a number of concurrent flows, 2) join a number of concurrent flows or 3) both join and fork a number of incoming flows to a number of outgoing flows. |
Fork/Join Fork Join | |
A Fork/Join element can be used to: 1) Split a single flow into a number of concurrent flows 2) Join a number of concurrent flows or 3) Both join and fork a number of incoming flows to a number of outgoing flows |
StateMachine Diagram Connector Toolbox Items
Icon |
Description |
See also |
---|---|---|
A Transition connector represents the logical movement from one State to another in a StateMachine diagram. |
Transition | |
An Object Flow connects two elements, with specific data passing through it, modeling an active transition. |
Object Flow |
Notes
Learn more