- Centralizing flow definitions
- Referencing flows from serialized configurations
- Building flow libraries
Basic Usage
Register a Flow
Retrieve and Run
Registry API
registerFlow
Register a flow builder function:getFlow
Retrieve a flow builder by ID:undefined if the flow is not registered.
hasFlow
Check if a flow exists:unregisterFlow
Remove a flow from the registry:true if the flow was removed, false if it didn’t exist.
listFlows
Get all registered flow IDs:getFlowCount
Get the number of registered flows:clearRegistry
Remove all registered flows:Provider Registry
Flow builders receive an optionalProviderRegistry for dependency injection:
Global Registry
The SDK provides a global registry instance:registerFlow, getFlow, etc.) operate on this global registry.
Use Cases
Flow Library
Create a library of reusable flows:Configuration-Driven Flows
Reference flows from configuration:Testing
Use the registry to swap providers for testing:Multi-Tenant Configuration
Different flows per tenant:Best Practices
Use Descriptive IDs
Version Your Flows
Handle Missing Flows
Initialize Registry on Startup
Next Steps
Creating Flows
Build custom flows
Pre-built Flows
Ready-to-use flow templates