Created
October 7, 2021 21:01
-
-
Save sgregson/1a0ada901cb3e2ff44854f7b6ea45029 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const acceptedState = { | |
id: "accepted", | |
initial: "defined", | |
states: { | |
defined: {}, | |
ticketized: {}, | |
["in progress"]: {}, | |
complete: {}, | |
}, | |
}; | |
const fetchMachine = Machine({ | |
id: "Homebase Proposals", | |
initial: "need identified", | |
states: { | |
["need identified"]: { | |
on: { | |
CREATE_PROPOSAL: "iterate", | |
}, | |
}, | |
iterate: { | |
on: { | |
REFINE: "iterate", | |
GOOD_ENOUGH: "office hours", | |
}, | |
}, | |
["office hours"]: { | |
on: { | |
NEEDS_REFINEMENT: "iterate", | |
CLEAR_ENOUGH: "ready for review", | |
}, | |
}, | |
["ready for review"]: { | |
on: { | |
TOP_OF_THE_QUEUE: "in review", | |
}, | |
}, | |
["in review"]: { | |
on: { | |
ACCEPTED: "accepted", | |
REJECTED: "rejected", | |
UNCLEAR_SYSTEM_IMPLEMENTATION: "iterate", | |
UNCLEAR_SYSTEM_VALUE: "iterate", | |
}, | |
}, | |
accepted: { | |
...acceptedState, | |
}, | |
rejected: {}, | |
dropped: { | |
on: { | |
VALUE_DEFINED: "iterate", | |
}, | |
}, | |
}, | |
on: { | |
DEEMED_NOT_USEFUL: "dropped", | |
}, | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment