workflow-external

command
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package main demonstrates external orchestration mode for workflows.

In external orchestration mode, state transitions are triggered by outside callers (HTTP handlers, message queues, etc.) rather than from within the conversation loop. The WorkflowConversation is thread-safe for concurrent Send() and Transition() calls from different goroutines.

Usage:

go run . -pack ./support.pack.json

Then interact via HTTP:

# Send a message to the current state's conversation
curl -X POST localhost:8080/send -d '{"message":"I need help with billing"}'

# Trigger a state transition
curl -X POST localhost:8080/transition -d '{"event":"Escalate"}'

# Check current state
curl localhost:8080/state

Jump to

Keyboard shortcuts

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