Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to model two interacting state machines of two different classes?

Tags:

state

uml

As far as I know, UML state machines model the behavior of one element, for example the behavior of one class.

I wonder how to model state machines with two classes which interact.

The state of one class depends on the state of the other class and transition of one state machine may trigger transition of the other state machine.

Do I have to use UML effect? Could an UML effect of one state machine trigger a transition of another state machine?

like image 492
granier Avatar asked Oct 19 '25 12:10

granier


1 Answers

You can send events between classes to trigger transitions, something like this, for example:

enter image description here


enter image description here

like image 174
sergej Avatar answered Oct 22 '25 02:10

sergej