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

Composite States and Regions

The modeling of states has to be hierarchical to deal with the complexity of engineering systems; the SysML provides two mechanism for modeling this hierarchy in a StateMachine:

  • Regions - which are separate parts of a StateMachine
  • Composite States - which are States that contain other States

Systems and the objects they contain often exhibit concurrent behavior where two things can be occur at the same time; often these separate behaviors interact with each other to create complex state-based behavior. These behaviors are typically represented in the Block that the StateMachine is describing and might involve parts that have differing lifetimes. These situations can be modeled using regions; a StateMachine can contain any number of regions, each with its own set of States, Pseudostates and the transitions that connect them.

A State itself might need to be hierarchical where a single State can be decomposed into a number of sub-States representing the states that form part of the composite State. For example a Robot might have Operating and Maintenance States; the Maintenance State could be decomposed into a number of sub-states such as Recharging Battery, Updating Environment and Updating Software Modules. Each of these States could in turn be decomposed into a number of other States.

Enterprise Architect provides a useful starting point for modeling complex state behavior, by providing a series of model patterns that can be used to model all aspects of StateMachines, including modeling Composite States and Regions.

Composite States are indicated by the oo ('infinity') symbol and reference a child diagram. The child diagram can be previewed by clicking on the icon.  Double-clicking on the element or on the diagram preview will open the diagram for editing.

These patterns can be accessed using the Model Wizard (Start Page 'Create from Pattern' tab).

This image shows a diagram that has been created from the State with Regions pattern, which has been simply injected into the model and acts as a starting point for the modeler. The modeler can tailor the diagram by replacing the names of States and Transitions and adding or deleting regions as required.

The regions in State B provide a parallel flow of processes in Region One and Region Two.