'User Onboarding State machine - Storage and implementation

How to implement a user onboarding state machine ?

For Example : onboarding drivers in a uber system has many steps as below :

  1. Sign-up

  2. Vehicle details

    a. If he already owns a vehicle, then fill up the details

    b. If he doesn't own a vehicle, then he need to apply for one.

  3. Screening Process

  4. Documents verification

  5. Training video

See this Onboarding process from UBER

  • How can we store / implement this on boarding process for each user ? How to represent these details in DB ?
  • This on boarding process may vary in each city/state/country and our system should be capable of handling this as well.
  • Also, When a user has incomplete the process and logins again after sometime we should take him to the appropriate process to finish.


Solution 1:[1]

I would recommend looking into temporal.io. It supports modeling such long running business transactions as fault-oblivious Java code. It is an open source platform which is proven in production at Uber and outside.

Solution 2:[2]

User Onboarding is the process through which new software is designed such that new users are provided and acquire the necessary knowledge, skills, and behaviors in order to become “up and running” and effective users of the website, app, or software service. State Machine modeling is one of the most traditional patterns in Computer Science. It’s one of those design patterns which impacts our daily life through different software. It’s not a coding-oriented ( Gang of Four types) design pattern, but it’s system-oriented, mostly used to model around business use cases.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Shuvadeep Sarkar