Why FSMs? Easy way to think about control structure: Nodes = actions, Transitions = reactions Separates control (links) from function (nodes) Easy way to handle fork/join, randomness, timeouts Easy to trace execution Events: internally generated: completion, success/failure external: taps, text messages show how transitions become active, listen, fire... FSMs notation Event and EventListener handling failures, completions, and cancellations runfsm genfsm tracefsm