composite state

A composite state is a state with at least one region. To distinguish a composite state from simple states and submachines, a submachine state symbolis in the header and a horizontal line is in the operation body.

The composite state is entered when the condition starts and is exited as when the condition is complete.

Icon

Regions are created in the Decomposition Compartment. If a composite state contains at least two regions, it is referred to as an orthogonal composite state. Each region in an orthogonal composite state has a set of states and transitions that can execute in parallel, but cannot transition between regions. Each region can support an active state and take transitions in parallel with other regions of an orthogonal composite state. The composite state below has two regions: labeled 1 and 2, indicating their evaluation order.

Composite State reorder 1

Any state within a region of a composite state is called a substate of that composite state. If the substate is not contained by any other state, it is called a direct substate; otherwise, it is referred to as an indirect substate.

Each region of a composite state may have an initial state indicator and a final state. A transition to the enclosing state represents a transition to the initial state indicator in each region. A transition to a final state represents the completion of the enclosing region. Completion in all orthogonal regions represents completion of the enclosing state. Completion of the topmost regions of a composite state corresponds to its termination.

If a transition terminates on an enclosing state and the enclosed regions do not have an initial pseudostate, it is considered an ill-formed model.

To add a region

Horizontal regions work best when you are using join or fork pseudostates.

      Right-click the Decomposition compartment of the composite state and choose Insert Horizontal Region or Insert Vertical Region.

To resize a region

      Point to the dashed line dividing the regions and drag.

To remove a region

      Point to the dashed line dividing the regions and drag to the closest border.

To change the evaluation order

1.    Right-click over any region and choose Reorder Region.

The regions are outlined in blue.

2.    Point to the region to be designated 1 and click.

3.    Repeat step 2 for all remaining regions that are to be re-ordered.

4.    Right-click to exit re-order mode.

Constraints

      A region can have at most one initial state indicator

      A region can have at most one deep history pseudostate

      A region can have at most one shallow history pseudostate

Color

Background: Specifies the color of the decomposition region of the state.

Border: Specifies the color for the state borders.

Header: Specifies the color of the header region. To change the font color, use View > Fonts.

Comment: Indicates information or notes about the state. The comments only appear in the dialog.

Name: Specifies a name for the state. The name can be alphanumeric characters. It must be unique with respect to other state names in the state chart.

State Activity Code: Specifies one or more actions and associated behaviors. Enter and edit state activity code in Activity Manager.