Adding a Pin to a Closed Hierarchy State
Pins are needed only in closed hierarchy states. In open hierarchy states, you can simply draw a connection to a substate.
Right-click a hierarchy state.
Select Add Pin from the context menu.
A pin with a default name is created on the state symbol. A corresponding pin is drawn inside the hierarchy.
You can now connect a transition to the pin on the state symbol, and then connect the pin inside the hierarchy to a state.