Skip to content

Instantly share code, notes, and snippets.

@sandbochs
Last active March 9, 2020 19:49
Show Gist options
  • Save sandbochs/2332fc60ebac5b1f49819e587428c40a to your computer and use it in GitHub Desktop.
Save sandbochs/2332fc60ebac5b1f49819e587428c40a to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const stepIdentity = Machine({
id: 'identity',
initial: 'not_started',
states: {
'not_started': {
on: {
'submit_iss_country': 'in_progress',
'submit_document': 'in_progress',
'submit_address': 'in_progress',
}
},
'in_progress': {
on: {
'check_submitted': 'waiting_vendor',
}
},
'waiting_vendor': {
on: {
'check_cleared': 'approved',
'document_report_age_verification': 'blocked',
},
},
'under_review': {
on: {
// waiting_vendor
'document_report_age_verification': 'blocked',
// under_review
'face_not_present': 'recreated',
'original_doc_not_present': 'blocked',
'all_reports_processed': 'approved'
}
},
'recreated': {
on: {
// waiting_vendor
'document_breakdown_age_verification': 'blocked',
// under_review
'original_doc_not_present': 'blocked',
}
},
'approved': {
type: 'final'
},
'blocked': {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment