Last active
September 19, 2019 00:54
-
-
Save 24601/12176ff6ac635aba4581cf7bae744829 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const documentMachine = Machine({ | |
id: 'document', | |
initial: 'structuring', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
structuring: { | |
on: { | |
STRUCTURE_COMPLETE: 'approving_structure' | |
} | |
}, | |
approving_structure: { | |
on: { | |
STRUCTURE_APPROVED:'filling_out' | |
, | |
STRUCTURE_REJECTED:'structuring' | |
} | |
}, | |
filling_out: { | |
on: { | |
FILLED_OUT:'approving_filled_out' | |
} | |
}, | |
approving_filled_out: { | |
on: { | |
FILLED_OUT_APPROVED:'signing' | |
, | |
FILLED_OUT_REJECTED:'filling_out' | |
} | |
}, | |
signing: { | |
on: { | |
FULLY_SIGNED:'document_signed', | |
SIGNATURE_REJECTED:'structuring' | |
} | |
}, | |
document_signed: { | |
on: { | |
RENDERED:'document_rendered' | |
} | |
}, | |
document_sent : { | |
type:"final" | |
}, | |
document_rendered: { | |
on: { | |
SENT_OUT:'document_sent' | |
} | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment