There are different types of events we need to handle in a state diagram:
-
Signal event: receipt of a signal e.g.
rightmousedown, sendSMS(message) -
Call event: operation call e.g.
occupy(user, lectureHall), register(exam) -
Time event: time-based state transition e.g.
after(5 seconds)orwhen(time==16:00) -
Any receive event: occurs when any event occurs that does not trigger another transition from the active state e.g. keyword =
all -
Completion event: generated automatically when everything to be done in the current state is completed
-
Change event: permanently checking whether a condition becomes true e.g.
when(x,y), after(90min)Below is a comparison between a change event and a guard:
