Skip to content

Instantly share code, notes, and snippets.

@Mongey
Created March 13, 2020 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mongey/42d1900cb223dacad51ccc6a05d064b2 to your computer and use it in GitHub Desktop.
Save Mongey/42d1900cb223dacad51ccc6a05d064b2 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const applicationMachine = Machine({
id: 'application',
initial: 'Unlocked',
states: {
Unlocked: {
on: { Confirmed: 'Decision'},
},
Decision: {
on: {
No: 'Rejected',
Yes: 'ReadyToPrice',
Maybe: "UWClarification",
Unknown: "UWClarification",
}
},
UWClarification: {
on: {
OK: 'Unlocked',
NicheClarified: "Unlocked",
Rejected: "Rejected",
}
},
ReadyToPrice: {
on: { Price: 'Priced'}
},
Priced : {
on: {
Payment: 'Accepted',
PaymentFailed: 'Priced',
},
after: {
TIMEOUT: 'Expired'
},
},
Accepted : {
on: {
SubmittedToSocotra: "Bound"
},
},
Expired: {
on: {
Redo: "Decision"
}
},
Bound : {
type: 'final'
},
Rejected: {
type: 'final'
}
}
}, {
delays: {
TIMEOUT: 10000
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment