@startuml ' --- Command STATE DIAGRAM --- ' (see http://plantuml.com/fr/state-diagram) title __**models.Command class : State Diagram**__ end title [*] --> PENDING : **created by sender** ' --- (1) PENDING --- PENDING: + s_deposit_time \n+ r_read_time PENDING --> RUNNING : **launched** PENDING --> SKIPPED: **recipient is IDLE** PENDING --> EXPIRED: **command is too old** PENDING --> INVALIDATED: **cancelled by sender** ' --- (2) RUNNING, SKIPPED, or EXPIRED --- RUNNING: + r_start_time RUNNING --> EXECUTED : **finished** RUNNING --> KILLED: \l**aborted** \n(by sender or other allowed agent, \nwith command "abort" or "exit") SKIPPED: + end_time SKIPPED --> [*] EXPIRED --> [*] EXPIRED: + end_time \n+ killer_agent_name INVALIDATED --> [*] INVALIDATED: + end_time \n+ killer_agent_name ' --- (3) PROCESSED or KILLED --- EXECUTED: + end_time EXECUTED --> [*] KILLED --> [*] KILLED: + end_time \n+ killer_agent_name @enduml