Asynchronous execution of ordinary workflow
This repository shows how to create Temporal worker with a simple processing task
- Temporal binary need to be installed in your system
temporal server start-dev --db-filename temporal.db- Run worker from this folder
go run service-worker/main.go- Run the API service to manipulate the workflow
go run service-api/main.go- Start the workflow and observe workflow in the temporal UI
curl -v -X POST 'http://localhost:8093/process/create?name=xxx&desc=testprocess'- Workflow will be awaiting next signals, that can update the Process record
curl -X PATCH 'http://localhost:8093/process/stage?id=proc_${ID_FROM_UI}&stage=execute'- Confirm that workflow can move into the final part of the execution
curl -X PATCH 'http://localhost:8093/process/stage?id=proc_${ID_FROM_UI}&stage=finalize'- Complete the workflow with the confirmation signal
curl -X PATCH 'http://localhost:8093/process/confirm?id=proc_${ID_FROM_UI}' - Observe workflow completed and went through all the execution steps in the Event History