Skip to content

Instantly share code, notes, and snippets.

@wolever
Last active April 23, 2020 03:07
Show Gist options
  • Save wolever/0f18ea2e6f12ba94d82f9681a7d4d734 to your computer and use it in GitHub Desktop.
Save wolever/0f18ea2e6f12ba94d82f9681a7d4d734 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
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