A Junction Point provides the ability to merge one or more incoming transitions into a single outgoing transition.
A Junction Point with name J1 is represented by the following graphic:
One or more incoming transitions can be connected to the Junction Point. Only a single outgoing transition can be connected to the Junction Point.
Similarly to an Entry Point the Junction Point can be used to merge several input transitions into a single output transition. However Junction Points are not limited to a state's border and can be created anywhere within a State Editor. It can really help de-clutter model diagrams by reducing the number of transition lines required.
When a Junction Point is entered, it's outgoing transition is automatically taken and it's Transition Action, if any, is executed. Note that the transition's Guard Condition is fixed to TRUE and an event cannot be assigned to it.
If no outgoing transition has been defined, then the model is considered to be ill-defined, and the script will terminate with the message, "Script terminated! No outgoing transition for Junction Point: J1 in state: StateName".
The following model shows the state logic for a fixed-track car with an alarm system. The car starts moving whenever someone sits down in it and stops when the avatar stands up.
Several different events can set off an alarm. The transitions for these events are merged together via the Junction Point J into the transition Alarm which leads to the state Siren to sound the alert. After a timeout, the car returns to the Parked state.
- Each Junction Point must be uniquely named within the context of a composite state.