Broadcast Local Events in Parallel States
Directed Event Broadcast Using Send
This example shows the behavior of directed event broadcast using the
send(
syntax on a transition.event_name,state_name)

Initially, the chart is asleep. Parallel substates A.A1 and
B.B1 are active, which implies that parallel (AND)
superstates A and B are also active. The
condition [data1==1] is true. The event E_one
belongs to the chart and is visible to both A and
B.
After waking up, the chart checks for valid transitions at every level of the hierarchy:
The chart root checks to see if there is a valid transition as a result of the event. There is no valid transition.
State
Achecks for any valid transitions as a result of the event. Because the condition[data1==1]is true, there is a valid transition from stateA.A1to stateA.A2.The action
send(E_one,B)executes:The broadcast of event
E_onereaches stateB. Because stateBis active, that state receives the event broadcast and checks to see if there is a valid transition. There is a valid transition fromB.B1toB.B2.State
B.B1exitactions (exitB1()) execute and complete.State
B.B1becomes inactive.State
B.B2becomes active.State
B.B2entryactions (entB2()) execute and complete.
State
A.A1exitactions (exitA1()) execute and complete.State
A.A1becomes inactive.State
A.A2becomes active.State
A.A2entryactions (entA2()) execute and complete.
This sequence completes execution of a chart with a directed event broadcast to a parallel state.
Directed Event Broadcast Using Qualified Event Name
This example shows the behavior of directed event broadcast using a qualified event name on a transition.

The only differences from the chart in Directed Event Broadcast Using Send are:
The event
E_onebelongs to stateBand is visible only to that state. To assign the eventE_onein the scope of stateB, in the Model Explorer select the state and add the event.The action
send(E_one,B)is nowsend(B.E_one).Using a qualified event name is necessary because
E_oneis not visible to stateA.
After waking up, the chart checks for valid transitions at every level of the hierarchy:
The chart root checks to see if there is a valid transition as a result of the event. There is no valid transition.
State
Achecks for any valid transitions as a result of the event. Because the condition[data1==1]is true, there is a valid transition from stateA.A1to stateA.A2.The action
send(B.E_one)executes and completes:The broadcast of event
E_onereaches stateB. Because stateBis active, that state receives the event broadcast and checks to see if there is a valid transition. There is a valid transition fromB.B1toB.B2.State
B.B1exitactions (exitB1()) execute and complete.State
B.B1becomes inactive.State
B.B2becomes active.State
B.B2entryactions (entB2()) execute and complete.
State
A.A1exitactions (exitA1()) execute and complete.State
A.A1becomes inactive.State
A.A2becomes active.State
A.A2entryactions (entA2()) execute and complete.
This sequence completes execution of a chart with a directed event broadcast using a qualified event name to a parallel state.