Extended data:
State machine is used to model the dynamic behavior of model elements, more specifically, it is the event-driven aspect of system behavior (see concept: events and signals).
State machines are dedicated to defining state-dependent behaviors (that is, behaviors that change according to the state of model elements). Model elements whose behavior does not change with their element states do not need a state machine to describe their behavior (these elements are usually passive classes of main load management data).
A state machine consists of states, which are linked together by transformations. State is the condition when an object performs an activity or waits for an event. A transition is a relationship between two states, which is triggered by an event and then performs a specific operation or evaluation and leads to a specific end state.
A simple editor can be regarded as a finite state machine, whose state is empty, waiting for a command and waiting for text.
Events such as Load file, Insert text, Insert character, and Saveandquit cause state machine transitions. Figure 2 below describes the editor's state machine.