Skip to content

Commit

Permalink
Define simple workflow with xstate
Browse files Browse the repository at this point in the history
  • Loading branch information
FyreByrd committed Sep 9, 2024
1 parent a095467 commit 20e1574
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 2 deletions.
42 changes: 42 additions & 0 deletions source/SIL.AppBuilder.Portal/node-server/workflow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { createMachine } from "xstate";


export const NoAdminS3 = createMachine({
initial: 'start',
states: {
AppBuilderConfiguration: {
on: {
'Continue': {
target: 'ProductBuild'
}
}
},
SynchronizeData: {
on: {
'Continue': {
target: 'ProductBuild'
}
}
},
ProductBuild: {
on: {
'BuildSuccessful': {
target: 'VerifyAndPublish'
}
}
},
VerifyAndPublish: {
on: {
'Reject': {
target: 'SynchronizeData'
},
'Approve': {
target: 'Published'
}
}
},
Published: {
type: 'final'
}
}
});
142 changes: 141 additions & 1 deletion source/SIL.AppBuilder.Portal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion source/SIL.AppBuilder.Portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vvo/tzdb": "^6.142.0",
"@xstate/svelte": "^3.0.4",
"autoprefixer": "^10.4.16",
"commander": "^11.1.0",
"daisyui": "^4.12.10",
Expand Down Expand Up @@ -65,7 +66,9 @@
"@auth/express": "^0.6.0",
"@auth/sveltekit": "^1.4.2",
"@bull-board/express": "^5.21.3",
"@statelyai/inspect": "^0.4.0",
"express": "^4.19.2",
"sil.appbuilder.portal.common": "file:common"
"sil.appbuilder.portal.common": "file:common",
"xstate": "^5.18.1"
}
}

0 comments on commit 20e1574

Please sign in to comment.