Last active
January 10, 2020 15:10
-
-
Save mset/b32ab41a9de464b743fb140956becdf9 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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 fetchMachine = Machine({ | |
| id: 'GDPR Request', | |
| initial: 'Draft', | |
| context: { | |
| retries: 0 | |
| }, | |
| states: { | |
| Draft: { | |
| on: { | |
| 'ASSIGN TO DPO': 'New' | |
| } | |
| }, | |
| New: { | |
| on: { | |
| START: 'In Progress', | |
| 'WITHDRAW': 'Withdrawn' | |
| } | |
| }, | |
| 'In Progress': { | |
| on: { | |
| 'STOP THE CLOCK': 'On Hold', | |
| 'CLOSE': 'Closed', | |
| 'WITHDRAW': 'Withdrawn' | |
| } | |
| }, | |
| 'On Hold': { | |
| on: { | |
| 'RESTART THE CLOCK': 'In Progress', | |
| 'WITHDRAW': 'Withdrawn' | |
| } | |
| }, | |
| 'Closed': { | |
| type: 'final' | |
| }, | |
| 'Withdrawn': { | |
| type: 'final' | |
| }, | |
| } | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment