Skip to content

Instantly share code, notes, and snippets.

@hellobrian
Created November 20, 2019 22:10
Show Gist options
  • Save hellobrian/31ea86c99a4e94cc45e7ce739fe8db55 to your computer and use it in GitHub Desktop.
Save hellobrian/31ea86c99a4e94cc45e7ce739fe8db55 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 clientEngagmentMachine = Machine({
id: 'clientEngagmentMachine',
initial: 'submitted_to_client',
states: {
submitted_to_client: {
on: {
YES: 'interview_scheduling_started',
MAYBE: 'client_requested_additional_info',
NO: 'client_rejected_candidate'
}
},
interview_scheduling_started: {
on: {
SCHEDULED: 'interview_scheduling_done'
}
},
interview_scheduling_done: {
on: {
ADDITIONAL_INTERVIEW: 'interview_scheduling_started',
YES: 'offer_extended',
NO: 'client_rejected_candidate'
}
},
client_requested_additional_info: {
on: {
NO: 'client_rejected_candidate',
MAYBE: 'client_requested_additional_info'
}
},
client_rejected_candidate: {
type: 'final'
},
offer_extended: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment