Skip to content

Instantly share code, notes, and snippets.

@GiancarlosIO
Last active August 24, 2020 19:54
Show Gist options
  • Save GiancarlosIO/4097724a13f6263e4f8f9f2cf96d8e27 to your computer and use it in GitHub Desktop.
Save GiancarlosIO/4097724a13f6263e4f8f9f2cf96d8e27 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({
id: 'Frontend workflow',
initial: 'planning',
states: {
planning: {
on: {
CREATE_BACKLOG: 'design'
}
},
design: {
on: {
APPROVED_BY_FRONTEND: 'development',
REJECTED_BY_FRONTEND: 'design'
}
},
development: {
on: {
FINISH: 'product-review',
FIX_CODE_REVIEW_OBS: 'code-review',
FIX_UI_OBS: 'product-review',
}
},
'product-review': {
on: {
APPROVED_BY_UI_DESIGNER: 'code-review',
REJECTED_BY_UI_DESIGNER: 'development'
}
},
'code-review': {
on: {
APPROVED_BY_CODE_REVIEWER: 'ready',
REJECTED_BY_CODE_REVIEWER: 'development',
}
},
ready: {
entry: ['run-qa-tests'],
on: {
QA_TESTS_PASSED: 'production',
QA_TESTS_FAILS: 'development',
}
},
production: {
entry: ['measure', 'create-funnels', 'generate-reports', 'create-documentation'],
on: {
TECH_IMPROVEMENTS_CURRENT_FEATURE: 'development',
PRODUCT_IMPROVEMENTS_CURRENT_FEATURE: 'design'
},
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment