Last active
December 22, 2019 18:57
-
-
Save Javarome/e56cf140427a381b96b856f3969448e1 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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 knMachine = Machine({ | |
id: 'knowledge', | |
initial: 'created', | |
states: { | |
/** | |
* created or modified | |
*/ | |
created: { | |
after: { | |
500: 'saved', | |
}, | |
}, | |
/** | |
* created or modified | |
*/ | |
saved: { | |
on: { | |
EDIT: 'editing', | |
PUBLISH: 'to_publish', | |
DELETE: 'deleting', | |
}, | |
}, | |
editing: { | |
after: { | |
500: 'saving', | |
}, | |
}, | |
deleting: { | |
after: { | |
500: 'deleted', | |
}, | |
}, | |
saving: { | |
after: { | |
500: 'saved', | |
}, | |
}, | |
/** | |
* validated, marked for publication (to include in training batch) | |
*/ | |
to_publish: { | |
on: { | |
PUBLISH_DONE: 'published', | |
}, | |
}, | |
/** | |
* trained has finished ;; | |
* sync with the assistant | |
*/ | |
published: {}, | |
deleted: {type: 'final'}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment