HomeUniteUs
HomeUniteUs copied to clipboard
Design and implement initial state machine database model for all business entities
Overview
Define the base schema(s) to be used for stateful entities in the HUU logical business model
Action Items
- [ ] Create a state machine or statechart for the
Case
model
Resources/Instructions
- Example basic statechart information for
Case
:- states:
- awaiting_coordinator_approval
- awaiting_host_acceptance
- awaiting_initial_meeting
- ineligible
- events
- guest_submit_interest
- guest_withdraw_interest
- coordinator_approve
- coordinator_reject
- coordinator_create_case
- host_accept
- host_reject
- states:
- Reference material:
- For design, consider the
Trip
model in this article - For implementation, consider the "Programming Model" section of this article
- Conceptual and technical
- https://xstate.js.org/docs/guides/introduction-to-state-machines-and-statecharts
- https://statecharts.dev/
- https://en.wikipedia.org/wiki/Finite-state_machine
- For design, consider the
An important requirement to bear in mind for this task is that we will need two sets of dynamic state types that will vary by organization:
- Document submittals
- Trainings / orientations
For the initial pass at the state machine or statechart, consider these as aggregate states e.g. awaiting_all_documents_submitted
and awaiting_all_trainings_completed
(feel free to change the naming convention, another alternative for these examples could be host_submitting_documents
and host_completing_trainings
or any that clearly represent the state)
As part of the existing work underway for the basic features, this requirement will be satisfied using the PostgreSQL transaction log directly, or an integration with e.g. RedHat's Debezium