Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Health Lottery App Logic
Health Lottery App Logic
Is User Logged In?
yes -> Logged In Flow
no -> Logged Out Flow
Logged Out Flow
Play Logged Out*
tap Scan Paper Ticket -> Scan to Wallet
Results Logged Out
Logged In Flow
Play Logged In*
tap Results -> Results Logged In
Play
Scanned Ticket Has Future Draws?
yes -> Play Numbers Saved
no -> Play Default
Play Default
Play Numbers Saved
Play Bonus
Play Receive Bonus?*
pass age verification -> Bonus Ticket Has Future Draws?
fail age verification -> Contact Us to Verify Age
Bonus Ticket Has Future Draws?
yes -> Play Bonus Numbers Saved
no -> Play Bonus Default
Play Bonus Default
Play Bonus Numbers Saved
Play Prize Received
Play Receive Prize?*
pass age verification -> Prize Ticket Has Future Draws?
fail age verification -> Contact Us to Verify Age
Prize Ticket Has Future Draws?
yes -> Play Prize Numbers Saved
no -> Play Prize Default
Play Prize Default
Play Prize Numbers Saved
Results Logged In
tap Scan Paper Ticket -> Scan to Wallet
Scan to Wallet
Ticket Scanner
point camera at ticket -> Is Shape Within Bounds?
tap Enter Ticket Details Manually -> Enter Ticket Details
Camera
Camera Highlight Bounds
Is Shape Within Bounds?
yes -> Is Barcode Detected?
no -> Camera
Is Barcode Detected?
yes -> Scan Logic
no -> Camera Highlight Bounds
Has Barcode Detection Failed Multiple Times?
yes -> Error Message Multiple Attempts
no -> Camera Highlight Bounds
Retrieve Ticket Manually
tap Scan Ticket -> Ticket Scanner
Enter Ticket Details
tap Enter Barcode -> Retrieve by Barcode
tap Enter Date Last Number of First Line and Last 3 Barcode Digits -> Retrieve by Details
Retrieve by Barcode
enter 20 digits -> Scan Logic
Retrieve by Details
enter date last number of first line and 3 last barcode digits -> Scan Logic
Scan Logic
Has A Valid Response Been Received From Server?
yes -> Does Ticket Exist?
no -> Error Message
Does Ticket Exist?
yes -> Is Ticket Linked to Another Account?
no -> Error Ticket Not Found
Is Ticket Linked to Another Account?
no -> Have All Draws on Ticket Expired?
yes -> Error Ticket Linked to Another Account
Have All Draws on Ticket Expired?
yes -> Error Ticket Expired
no -> Has Prize Been Claimed?
Has Prize Been Claimed?
no -> Is Winning Ticket?
yes -> Does Claimed Ticket Have Future Draws?
Does Claimed Ticket Have Future Draws?
no -> Error Prize Claimed
yes -> Is Winning Ticket?
#Also applies if scanned ticket has unclaimed wins
Is Winning Ticket?
yes -> Winning Ticket
no -> Losing Ticket
Scan Error
tap Try Again -> Ticket Scanner
tap Enter Numbers Manually -> Results Logged Out
tap Enter Ticket Details -> Enter Ticket Details
Error Ticket Not Found
tap Phone Number -> Call the Call Centre
Error Ticket Expired
Error Prize Claimed
Error Ticket Linked to Another Account
tap Log In -> Log In Loss
Error Message
Error Message Multiple Attempts
Ticket
Losing Ticket
Is Loser Logged In?*
yes -> Losing Ticket Has Future Draws?
no -> Losing Ticket Numbers
Losing Ticket Has Future Draws?
yes -> Losing Ticket Numbers Future Draws Logged In
no -> Play Default
Losing Ticket Numbers
tap Sign Up to Get Bonus and Save Numbers -> Sign Up Loss
tap Already Have an Account -> Log In Loss
Losing Ticket Numbers Logged In
tap Finish -> Play Default
Losing Ticket Numbers Future Draws Logged In
tap Save Future Draws to Get Notified -> Play Numbers Saved
tap Proceed Without Saving -> Play Default
Winning Ticket
Winning Ticket Numbers*
tap Claim Prize -> Is Prize Amount Above Threshold?
Is Prize Amount Above Threshold?
yes -> Contact Us to Claim Prize
no -> Is Winner Logged In?
Is Winner Logged In?
yes -> Transfer to Wallet Logged In
no -> Transfer to Wallet Logged Out
Transfer to Wallet Logged In
tap Transfer Prize to Wallet -> Play Receive Prize?
tap Collect Prize From Retailer -> Collect Prize From Retailer
Transfer to Wallet Logged Out
tap Sign Up -> Sign Up Win
tap Log In -> Log In Win
tap Collect Prize From Retailer -> Collect Prize From Retailer
Contact Us to Claim Prize
tap Phone Number -> Call the Call Centre
Collect Prize From Retailer
tap Find Nearest Retailer -> Find Retailer
Sign Up
Sign Up Loss
submit valid form -> Play Receive Bonus?
tap Already Have an Account -> Log In Loss
Sign Up Win
submit valid form -> Play Receive Prize?
tap Already Have an Account -> Log In Win
Log In
Log In Loss
submit valid credentials -> Scanned Ticket Has Future Draws?
tap Sign Up -> Sign Up Loss
Log In Win
submit valid credentials -> Play Receive Prize?
tap Sign Up -> Sign Up Win
Contact Us to Verify Age
tap Phone Number -> Call the Call Centre
dismiss -> Play Logged In
Call the Call Centre
Find Retailer
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
You can’t perform that action at this time.