Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Q: How to handle more than one condition in a UML state machine transition

How do I handle more than one condition (with different boolean expressions) in a UML state machine transition (as guard)?

Example: enter image description here

In this example I would like to add more than only one condition (Tries < 3) in the transition from "logging in" to "Logged In" like discribed in the note.

How to handle this UML compliant?

like image 811
tsp Avatar asked Oct 25 '25 20:10

tsp


1 Answers

Simply spoken (and to focus on the needed step)

enter image description here

put a boolean condition like above in the Guard. This can be any text. You can write C-style or plain text. I'm not sure about OCL here, but that's for academic purpose anyway (my opinion).

N.B. Your diagram shows Tries = 3 which should be a Guard also (i.e. [Tries = 3]) rather than a Name.

like image 89
qwerty_so Avatar answered Oct 28 '25 11:10

qwerty_so