A small demo to execute Serverless Workflow on Temporal with inspiration and front-end code borrowed from https://github.com/tsurdilo/swtemporal
This is a very rough implementation for demo purposes therefore a lot of Serverless Workflow features have not been even remotely touched.
Some notable limitations that are consciously aware
- Only support operation and switch states (no eventing etc.)
- Only support sequential action execution (no parallel)
- Do not support function arguments
- Switch states are described using Go template conditions
-
You need a Temporal service running. See README.md for more details.
git clone https://github.com/temporalio/docker-compose.git cd docker-compose docker-compose -f docker-compose-cass-es.yml up
-
Run worker
go run worker/main.go
to start worker for dsl workflow.
-
Run editor + starter
go run starter/main.go
-
Open localhost:3000 and add a customer info and press Run Workflow
For rejected application
The starter log
2022/07/21 16:19:57 editor listening on :3000... 2022/07/21 16:19:57 INFO No logger configured for temporal client. Created default one. 2022/07/21 16:19:57 starter listening on :8080... 2022/07/21 16:20:11 Started workflow WorkflowID sw-localtest RunID f3e503f8-0e2e-4984-83f4-0a682b6731d6 2022/07/21 16:20:11 Workflow result: {"RejectApplication":"true"}
-
To see the executed workflow goto localhost:8088