Composite States

The Composite States pattern describes a Block or other element that has a number of States one or more of which themselves have states (sub states). The pattern allows the user to click through (drill-down) to another State Machine diagram representing the composite states.

Figure 1. A State Machine showing one State with a composite marker indicating it contains other States

Figure 2. A Composite State Machine that has a owning state.
Discussion
The purpose of the composite State is to allow a Systems Engineer to represent a state that itself has other States defined without representing those States explicitly on the same diagram. It allows the composite State to be marked as composite (indicated by a small marker on at the bottom right of the element) and the ability to double-click through to the composite level.

It is typically used when it becomes apparent that a state on one level of a State Machine diagram itself has States which need to be described to understand the behavior of the owing Block or other element.

The following is a list of some things you may want to do when working with this pattern.
·	Change the name of the diagram and States to suit the initiative.
Change the name of the Triggers, Guards and Events defined for each Transition.
Change the name of the Entry, Do and Exit actions defined within each State.

The following is a list of some of the next steps available when applying the pattern.
·	Create additional composite States where needed,
Create an executable State Machine from the diagram.
Show how States in this State Machine interact with States in other State Machine constructed for other elements in the model.
Automatically create high quality documentation using the document generator.

Useful Workspace Layouts Core | Core Modeling, Wide View
Reference
The following help topics will assist you learn about how to work with this pattern.
State Machines
Working with Diagrams
Changing Element Appearance
Changing Diagram Layout

The following tools are useful when working with this pattern.
Specification View
The Specification View can be used as a way of working with the Components and Interfaces particularly when there are a large number of elements as is typically the case when describing a system of any appreciable size. For more details see the Specification View help topic
Hand Drawn and Whiteboard Diagrams
The Hand Drawn and Whiteboard Mode are display options available for any diagram that changes a system-drawn diagram to appear as though it was drawn by hand and, optionally, hand drawn on a whiteboard. It is a powerful device to engage an audience by presenting the diagram in a rough and more immediate style giving the impression that it is just a sketch that can be changed. For more details see the Hand Drawn and Whiteboard Mode help topic.
Alternate and Images for Diagram Elements
Most standard elements allow an alternate image to be defined for an element that will be used in place of the graphical notation for the element either on a selected diagram or as a default on all diagrams. For more details see the Using the Image Manager help topic.
Document Generator
The Document Generator is a powerful facility in Enterprise Architect that allows a Database Engineer or other stakeholder to create high quality corporate or technical documentation directly from the model, suitable for internal or external audiences. For more details see the Documentation help topic or the more general topic on Model Publishing.

© 2000 - 2018  Sparx Systems Pty Ltd.  All rights Reserved.