Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

moj noms apvs chore routing

Thomas Swann edited this page Nov 14, 2016 · 1 revision

Routing

We need to route users through the application, collecting their data in a way that does not cause unnecessary complication or persist orphaned child claim applications often.

Here is the screen flow limited to the eligibility section:

screen flow

To avoid persisting records early and often in the flow we will store data in the URL path, so we are only updating the DB and creating records on significant steps. This keeps the application stateless up to a certain point, avoiding saving records when there is a good chance the user will 'fail' eligibility.

/start             
/first-time                                                                  # first screen in flow, asking for dob
/first-time/{dob}                                                            # dob saved into path as string
/first-time/{dob}/{relationship}                                             # benefits
/first-time/{dob}/{relationship}/{benefit}                                   # about-prisoner page, on submit we persist 
/first-time/eligibiltiy/{reference}/about-you/{dob}/{relationship}/{benefit} # about visitor, use data from path
/first-time/eligibiltiy/{reference}/file-upload                              # now have persisted eligibility reference
/first-time/eligibiltiy/{reference}/visit-type                               # Into claim details

An example of a service doing this is GOV.UK State pension age, which builds data in the URL as the user progresses in the screens, avoiding state.

Clone this wiki locally