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
Click to show internal directories.
Click to hide internal directories.