Transition with the same start / end in the UML state diagram

I am new to UML, revising the FSM diagram, how to present two transitions that lead to the same state, for example, I am in state1:

when(event1)-->action1-->state2
when(event2)-->action2-->state2

I mean, do I need to draw two lines from state1 to state2?

+3
source share
1 answer

Yes, you have to draw two lines, since the event and the action are part of the line.

as you can see at http://en.wikipedia.org/wiki/File:UML_state_machine_Fig1.png

your string will receive text of type "event1 / action1"and "event2 / action2".

If you do not generate code in a diagram, you can also use one line and add text, for example "event1 / action1 OR event2 / action2", if it is more readable.

UML - , - .: -)

+2

All Articles