What is a composite state in a UML state machine diagram?

Composite states contain one or more state diagrams; if they contain multiple state diagrams, then the state diagrams are executed in parallel. in other words, a composite state is a state that contains one or more state graphs. Each diagram belongs to a region, and regions are divided by dashed lines. The states in the region are called sub-states of the composite state.

One key difference between UML state diagrams and other non-UML state diagrams that you may be familiar with is that UML allows concurrent states, or multiple states at the same time. Composite states make this possible.

Key Concepts of Submachines, orthogonal regions

A composite state is a state that contains a region or is decomposed into two or more regions. A composite state contains its own set of states and regions.

A submachine is inserted as a state into another state machine. The same submachine can be inserted multiple times.

Submachine vs Composite State 

A submachine state is semantically equivalent to a composite state. The regions of the submachine state machine are the regions of the composite state. The entry, exit, and behavior actions and internal transitions are defined as part of the state. Submachine state is a decomposition mechanism that allows factoring of common behaviors and their reuse.

An orthogonal region is part of a composite state or submachine, and each region has its own set of mutually exclusive states and transitions.

Composite state - yasmine - the C++ UML state machine framework

Learning More about State Diagram using Online Examples

Leave a Reply

Alamat email Anda tidak akan dipublikasikan.