Behavioral Diagrams: State Machine Diagrams
SysML Behavioral Diagram Types
Behavioral Related
5. Use Case Diagrams (uc)
what the system can do for the users
6. Activity Diagrams (act)
process & flow
7. State Machine Diagrams (stm)
modes of system
8. Sequence Diagrams (seq)
message flow over time
State Machine Diagrams (stm)
What is a SysML State Machine diagram? Several Different Definitions from the Experts
Definition 1:
State Machine diagram (smd): An State Machine diagram is a dynamic behavioral diagram that shows the sequences of States that an object or an interaction go through during its lifetime in response to Events (a.k.a. "Triggers"), which may result in side-effects (Actions.
Definition 2:
A State Machine diagram is a powerful way of presenting information about the lifetime of a system element such as a Block. It can be used to describe the important conditions (States) that occur in an entity's lifetime or cycles. Typically only entities that have important stages in their lifetime are modeled with State Machine diagrams. The entity is said to transition from one State to another as specified by the State Machine. Triggers and Events can be described that allow the state transition to occur and Guards can be defined that restrict the change of state. Each State can define the behaviors that occur on entry, during and exit from the State.
State Machine Simulation Example
State Machine Diagram (stm) Example
The coloring scheme of the diagram above is the SysML representation within the Cameo tool. The diagram below is an excerpt from "OMG Systems Modeling Language (OMG SysML) Version 1.4 and will give examples about the syntax of the language. Download the book here. For more helpful resources, go here.
When to use a stm
Complex systems are often composed of entities such as Blocks that have complex behavior and might have lifetimes that are difficult to understand.
StateMachines can be used to describe the important conditions (States) that occur in an entity's lifetime or cycles. Typically, only entities that have important stages in their lifetime are modeled with StateMachine diagrams. These diagrams provide insight into the way an entity transitions from state to state, ignoring conditions that are not important to the analysis.
What's the purpose of a stm?
The purpose of State Machine diagrams is to specify dynamic system behaviors for time-critical, mission-critical, safety-critical, or financially-critical objects. When properly applied (See Usage Notes below) State Machine diagrams are recursively scalable and simulatable.
Cameo stm Toolbar
Elements of a State Machine Diagram
State: A State (notation: rounded-rectangle a.k.a. "roundangle") represents a condition or situation during the life of an object during which it satisfies some condition, performs some activity, or waits for some event.
Elements
The main elements that can appear in Parametric diagrams are:
State
StateMachine
Initial
Final
Choice
History
Fork and Join
The main connectors that can appear in Parametric diagrams are:
Transition
Dependency