Last active
April 23, 2020 03:07
-
-
Save wolever/0f18ea2e6f12ba94d82f9681a7d4d734 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
Machine({ | |
id: 'KNIT', | |
initial: 'idle-no-flow', | |
states: { | |
'idle-no-flow': { | |
on: { | |
FLOW_ASSIGN: 'idle-with-flow' | |
} | |
}, | |
'idle-with-flow': { | |
on: { | |
CHECK_CONFIG: 'awaiting-check:config', | |
START_MACHINE: 'knitting', | |
}, | |
}, | |
'knitting': { | |
on: { | |
QC_CHECK_STOP: 'awaiting-check:qc-operator', | |
FLOW_FINISH: 'idle-no-flow', | |
}, | |
}, | |
'awaiting-check:config': { | |
on: { | |
CHECK_PASS: 'knitting', | |
}, | |
}, | |
'awaiting-check:qc-operator': { | |
on: { | |
CHECK_PASS: 'knitting', | |
CHECK_FAIL: 'awaiting-check:qc-mechanic', | |
}, | |
}, | |
'awaiting-check:qc-mechanic': { | |
on: { | |
CHECK_PASS: 'knitting', | |
CHECK_FAIL: 'offline', | |
}, | |
}, | |
offline: {}, | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment