Skip to content

Instantly share code, notes, and snippets.

@Quantisan
Created October 15, 2021 07:08
Show Gist options
  • Save Quantisan/2535b9b0b2a50f4d97db2d52e3d1cd6b to your computer and use it in GitHub Desktop.
Save Quantisan/2535b9b0b2a50f4d97db2d52e3d1cd6b to your computer and use it in GitHub Desktop.
(require '[stepwise.core :as stepwise])
(stepwise/ensure-state-machine
:make-pizza
{:start-at :make-dough
:states
{:make-dough {:type :task
:resource :make-pizza/make-dough
:next :make-sauce}
:make-sauce {:type :task
:resource :make-pizza/make-sauce
:next :put-ingredients-on-dough}
:put-ingredients-on-dough {:type :task
:resource :make-pizza/put-ingredients-on-dough
:next :bake}
:bake {:type :task
:resource :make-pizza/bake
:next :serve}
:serve {:type :task
:resource :make-pizza/bake
:end true}}})
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment