@startuml Composite States

state StateA {
    state StateAA {
        [*] --> StateAAA
        StateAAA --> StateAAB : toAAB / actionInAAA
    }
    state StateAB

    [*] --> StateAA
    StateAA --> StateAB : toAB / actionInAA
}

state StateB

[*] --> StateA
StateA --> StateB : toB / actionInA

@enduml
