UML Modeling Techniques > Dynamic modeling > State diagram items > Creating a state machine
  
Creating a state machine
You can create a State Machine for a Class, Interface, Operation, Subsystem, Actor, Use Case, Model, Package or Atomic State.
* 
When you create a State Machine from a Class or Interface, Modeler also creates a State Diagram as a child of the new State Machine.
For Dynamic Modeling create a State Machine for a Class, Interface or Operation, for System Modes Modeling create a State Machine for a Subsystem.
To create a state machine for a class, interface, operation, subsystem, actor, use case or atomic state:
1. Right-click the Class, Interface, Operation, Subsystem, Actor, Use Case or Atomic State that is to own the State Machine, point to New, and then click State Machine.
2. Type the name of the State Machine, and then press the Enter key.
To create a state machine for the model or a package:
1. Right-click the Model or Package that is to own the State Machine, point to New, point to UML, point to Behavior, and then click State Machine.
2. Type the name of the State Machine, and then press the Enter key.