ServerFlows
Node System
Extensible node architecture and implementations.
Node System
Every node in a flow is an instance of a specific Node Type.
Standard Node Types
| Type | Handler Responsibility |
|---|---|
| Start | Entry point, validates input event. |
| Decision | Evaluates a JS expression against vars and event. |
| CreateRecord | Calls RecordService.create with mapped fields. |
| UpdateRecord | Calls RecordService.update for a specific ID. |
| SetFields | Mutates the current vars context. |
| Delay | Pauses execution using Effect.sleep. |
| Webhook | Sends an HTTP request via WebhookClient. |
| Parallel | Splits execution into multiple concurrent branches. |
| Join | Synchronizes multiple branches before proceeding. |
Resilience Patterns
Retries
Nodes that perform I/O (Webhook, Record operations) are automatically retried using an exponential backoff schedule:
- Attempts: 2 (Configurable per node)
- Base Delay: 250ms
Timeouts
Every node has a mandatory timeout (default 10s). If a node exceeds this, the engine fails the step and records a TimeoutError.
Dead Letter
If a node fails after all retries, the engine creates a record in the FlowDeadLetter table. This preserves the exact state and error for human intervention.