temporal-async

module
v0.0.0-...-fc37c74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: MIT

README

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL