Last active
January 21, 2020 04:16
-
-
Save davidkpiano/5e79ce9f5dfbbcc56f745cdf2e6337e6 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
Machine({ | |
initial: 'inJira', | |
states: { | |
inJira: { | |
on: { | |
'': [ | |
{ | |
target: 'matchingOrg', | |
actions: 'cache', | |
cond: () => true | |
}, | |
{ | |
target: 'createUser', | |
cond: () => false | |
} | |
] | |
} | |
}, | |
matchingOrg: { | |
on: { | |
'': [ | |
{ | |
target: 'finished', | |
actions: 'api-1', | |
cond: () => true | |
}, | |
{ | |
target: 'finished', | |
actions: 'api-2', | |
cond: () => false | |
} | |
] | |
} | |
}, | |
createUser: { | |
on: { | |
'': [ | |
{ | |
target: 'finished', | |
actions: 'api-3', | |
cond: () => true | |
}, | |
{ | |
target: 'finished', | |
actions: 'api-4', | |
cond: () => false | |
} | |
] | |
} | |
}, | |
finished: { | |
type: 'final' | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment