Events & Signals
Events (also called signals) enable workflows to receive asynchronous messages from external systems and other workflows. A workflow can pause execution with wait_for_event(), and an external caller — a REST API handler, another workflow, or a cron job — delivers the event with send_event(). The workflow resumes from exactly where it left off.
Key Characteristics
- Asynchronous — Events are delivered without blocking the sender
- Buffered — Events sent before the workflow calls
wait_for_event()are queued and delivered immediately when the workflow is ready - Durable — Event delivery is journaled and survives crashes and replays
- Type-Safe — Events carry strongly-typed payloads that are deserialized automatically
- Named — Events are identified by string names, allowing a workflow to wait for different event types at different points
Senders
REST API
external
Workflow B
inter-workflow
Cron Job
scheduled
send_event►
send_event►
send_event►
Workflow A
Execute tasks
wait_for_event("approval")
paused · zero resources
event arrives ortimeout
Resume execution
Buffered: events sent before wait are queued
Topics
Receiving Events
Wait for events, use timeouts, and handle multi-step approval chains
Sending Events & Signals
Send events between workflows and understand event buffering
Event Patterns
Human approval, webhook callbacks, and dynamic workflow control
Best Practices & Troubleshooting
Naming conventions, timeout strategies, and common issues