State Diagram “Scanner Statechart”
Requirements
This diagram describes the behavior of the scanning device. (Yes, I know it is out of context, we'll just buy one that works. However, I want to show my boss that we can do state diagrams.)
Diagram Node Summary
Start
State: Barcode scanner active state.
Start
    Ack
State: Send an acknowledgement.
State: Waiting for the device to acknowledge communication.
       GoodScan
State: Scan was received and verified.
       NoScan
State: Scan is not yet good.
End
Diagram Node Detail
Start "StartState1"
All Outgoing Links
Transition
to State Active

State "Active"
Barcode scanner active state.
All Outgoing Links
Transition
to End EndState1
Event Name:
Timeout
Nested Nodes
 StartState2,  Ack,  Waiting for Ack

Start "StartState2"
Nested in node:
State Active
All Outgoing Links
Transition
to State Waiting for Ack
Event Name:
Active

State "Ack"
Nested in node:
State Active
Send an acknowledgement.

State "Waiting for Ack"
Nested in node:
State Active
Waiting for the device to acknowledge communication.
Nested Nodes
 GoodScan,  NoScan

State "GoodScan"
Nested in node:
State Waiting for Ack
Scan was received and verified.
All Outgoing Links
Transition
to State Ack
Event Name:
Acknowledge

State "NoScan"
Nested in node:
State Waiting for Ack
Scan is not yet good.
All Outgoing Links
Transition
to State GoodScan
Event Name:
Good Read

End "EndState1"