Created
March 19, 2020 22:14
-
-
Save sandbochs/fa6f19e1ab9ada27be5336e64935641f 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
const stepIdentity = Machine({ | |
id: 'identity', | |
initial: 'not_started', | |
states: { | |
'not_started': { | |
on: { | |
'iss_country_submitted': 'in_progress', | |
'document_submitted': 'in_progress', | |
'address_submitted': 'in_progress', | |
} | |
}, | |
'in_progress': { | |
on: { | |
'check_submitted': 'waiting_vendor', | |
} | |
}, | |
'waiting_vendor': { | |
on: { | |
'check_cleared': 'approved', | |
'document_breakdown_image_quality': 'recreated', | |
'document_breakdown_visual_authenticity': 'under_review', | |
'document_breakdown_police_record': 'blocked' | |
}, | |
}, | |
'under_review': { | |
on: { | |
// waiting_vendor | |
'document_breakdown_police_record': 'blocked', | |
// under_review | |
'authenticity_invalid': 'blocked' | |
} | |
}, | |
'recreated': { | |
on: { | |
// waiting_vendor | |
'document_breakdown_police_record': 'blocked', | |
// under_review | |
'authenticity_invalid': '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