SCESM: Scenarios and State Machines