Skip to content

Instantly share code, notes, and snippets.

@abp
Created August 14, 2018 10:51
Show Gist options
  • Save abp/5559bf3e9bee03d3d863fbc141955be8 to your computer and use it in GitHub Desktop.
Save abp/5559bf3e9bee03d3d863fbc141955be8 to your computer and use it in GitHub Desktop.
Idle*
Idle*
call registration API -> Register display
display connects -> Display connection
mobile message -> Mobile
display message -> Display
Message Server
Register display
display registered -> Idle
# Respond with error
error occured -> Idle
Display connection
display connected -> Idle
Login message
display ID extracted -> Display checks login
# Send error message to mobile
display ID unknown -> Idle
Display message
forwarded -> Display
Mobile message
forwarded -> Mobile
Client
Mobile
login sent -> Login message
interacted -> Display message
Display
interaction rendered -> Idle
interaction reply -> Mobile message
Display checks login
login accepted -> Mobile
# Send error message to mobile
login rejected -> Idle
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment