Skip to content

Latest commit

 

History

History

function-chaining

Folders and files

README.md

Function chaining (Go)

Three activities run in order to build a greeting: say hello → process greeting → finalize response. Each activity passes a Greeting value to the next one. The orchestration returns the final message.

Prerequisites

See the shared Go README for Go, emulator, and Azure setup.

Run

From this directory:

go run .

Or, from the Go samples directory: go run ./function-chaining.

Expected output

{
  "instance_id": "go-function-chaining-<unique-suffix>",
  "output": "Hello User! How are you today? I hope you're doing well!"
}

View the activity inputs and outputs at http://localhost:8082.

Code map

File Purpose
workflow.go The three-step orchestration
activities.go How each step changes the greeting
client.go Starts one instance and prints the result
worker.go Registers the tasks
main.go Command-line entry point

Tests

go test .
DTS_SAMPLES_E2E=1 go test -run '^TestIntegration$' -v .

Unit tests run offline. integration_test.go checks the completed greeting against a real backend.