Skip to content

Instantly share code, notes, and snippets.

@vmakoed
Created January 13, 2021 12:34
Show Gist options
  • Save vmakoed/78f926f75215b9ecfa92575d7ac14625 to your computer and use it in GitHub Desktop.
Save vmakoed/78f926f75215b9ecfa92575d7ac14625 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 dtaSyncProcessNode = Machine({
id: 'DTASyncProcessNode',
initial: 'created',
states: {
created: {
on: {
ENQUEUE: 'enqueued',
FAIL: 'failed'
}
},
enqueued: {
on: {
START: 'started',
FAIL: 'failed'
}
},
restarted: {
on: {
PARSE: 'parsed'
}
},
started: {
on: {
PARSE: 'parsed',
FAIL: 'failed',
RESTART: 'restarted'
}
},
parsed: {
on: {
IMPORT: 'imported',
CANCEL: 'cancelled',
FAIL: 'failed',
RESTART: 'restarted'
}
},
imported: {
on: {
COMPLETE: 'completed',
CANCEL: 'cancelled',
FAIL: 'failed',
RESTART: 'restarted'
}
},
completed: {
type: 'final',
RESTART: 'restarted'
},
failed: {
on: {
RESTART: 'restarted',
}
},
cancelled: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment