Book a Demo

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

Prev Next


A History State used in StateMachine diagrams modeled using Sparx Systems Enterprise Architect.


There are two types of History pseudostate defined in UML: shallow and deep history. A shallow History sub-state is used to represent the most recently active sub-state of a Composite State; this pseudostate does not recurse into this sub-state's active configuration, should one exist. A single connector can be used to depict the default shallow History state, in case the Composite State has never been entered.

A deep History sub-state, in contrast, reflects the most recent active configuration of the Composite State. This includes active sub-states of all regions, and recurses into those sub-states' active sub-states, should they exist. Only one deep history and one shallow history can exist within a composite state. You can reassign a shallow History sub-state as a deep History sub-state using the 'Advanced' element context menu.

An example of using a Composite State and a History State in a StateMachine modeled in Sparx Systems Enterprise Architect.

Toolbox icon

History element

Learn more

OMG UML Specification:

The OMG Unified Modeling Language specification, (v2.5.1, p.309) states:

The concept of State history was introduced by David Harel in the original statechart formalism. It is a convenience concept associated with Regions of composite States whereby a Region keeps track of the state configuration it was in when it was last exited. This allows easy return to that same state configuration, if desired, the next time the Region becomes active (e.g., after returning from handling an interrupt), or if there is a local Transition that returns to its history.

Two types of history Pseudostates are provided.

Deep history (deepHistory) represents the full state configuration of the most recent visit to the containing Region. The effect is the same as if the Transition terminating on the deepHistory Pseudostate had, instead, terminated on the innermost State of the preserved state configuration, including execution of all entry Behaviors encountered along the way.

Shallow history (shallowHistory) represents a return to only the topmost substate of the most recent state configuration, which is entered using the default entry rule.