Skip to content

xdire/temporal-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

temporal-async

Asynchronous execution of ordinary workflow

Why

This repository shows how to create Temporal worker with a simple processing task

How

  1. Temporal binary need to be installed in your system
temporal server start-dev --db-filename temporal.db
  1. Run worker from this folder
go run service-worker/main.go
  1. Run the API service to manipulate the workflow
go run service-api/main.go
  1. Start the workflow and observe workflow in the temporal UI
curl -v -X POST 'http://localhost:8093/process/create?name=xxx&desc=testprocess'
  1. 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'
  1. 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'
  1. Complete the workflow with the confirmation signal
curl -X PATCH 'http://localhost:8093/process/confirm?id=proc_${ID_FROM_UI}'   
  1. Observe workflow completed and went through all the execution steps in the Event History

About

Asynchronous execution of ordinary workflow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages