Microwave States (UML State Machine Diagram)
The state machine diagram shows three main states of a microwave oven - Ready, Cooking and Door Open. The Ready state is a composite state with other nested states. The nested states in the first region represent various power levels and the transitions show how to switch between them. The second state region shows states for timing. It contains the states Default Time Set and Custom Time Set.
The Cooking state includes a 'do' action that defines what is happening when this state is active. The microwave in the Cooking state emits microwaves and rotates the tray.
You can open the door in this state. Then the microwave oven switches to the Door Open state. The entry action of the Door Open state ensures that any operation of the oven will stop. The operation can continue only after closing the door and pressing the Start button (the actions are represented by transitions: close door and start).