Last active
March 18, 2021 14:30
-
-
Save Landerson352/b2b22737fa571e6bc506054440846699 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 issueMachine = Machine({ | |
id: 'issue', | |
initial: 'none', | |
states: { | |
none: { | |
on: { | |
USER_PAY: 'diagnosis open' | |
} | |
}, | |
'diagnosis open': { | |
on: { | |
USER_START_DIAGNOSIS: 'diagnosis in_queue', | |
} | |
}, | |
'diagnosis in_queue': { | |
on: { | |
VE_ACCEPT_CALL: 'diagnosis call_in_progress', | |
}, | |
}, | |
'diagnosis call_in_progress': { | |
on: { | |
VE_TRANSFER_CALL: 'diagnosis in_queue', | |
VE_COMPLETE_CALL_WITH_RESOLUTION: 'diagnosis complete / resolved_on_call', | |
VE_COMPLETE_CALL_DEFINITIVE: 'diagnosis complete / definitive', | |
VE_COMPLETE_CALL_INCONCLUSIVE: 'diagnosis complete / inconclusive', | |
}, | |
}, | |
'diagnosis complete / resolved_on_call': { | |
type: 'final', | |
}, | |
'diagnosis complete / definitive': { | |
on: { | |
USER_SCHEDULE_IN_HOME_REPAIR: 'in-home consumer_scheduled', | |
}, | |
}, | |
'diagnosis complete / inconclusive': { | |
on: { | |
USER_SCHEDULE_IN_HOME_DIAGNOSIS: 'in-home consumer_scheduled', | |
}, | |
}, | |
'diagnosis closed': { | |
type: 'final', | |
}, | |
'in-home consumer_scheduled': { | |
type: 'final', | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment