Executions
How workflow runs are created, processed, and tracked.
Executions
An Execution is a single run of a workflow. It tracks status, timing, input/output, and error information across its steps.
Schema
Execution Flow
BullMQ Integration
The execution engine uses a dedicated BullMQ queue (executions). The ExecutionsWorker processes jobs asynchronously with configurable concurrency.
workspaceId is stored directly on executions so the worker never needs to JOIN through spaces to resolve API keys or resource quotas.
Triggers
Schedule
SchedulesService.fireDueSchedules() runs on a cron tick, JOINs spaces to get workspaceId, and calls createFromTrigger(spaceId, workspaceId, workflowId, 'schedule', {}).
Webhook
WebhooksService.trigger(webhookId, payload) fetches the webhook row, JOINs spaces for workspaceId, and calls createFromTrigger(spaceId, workspaceId, workflowId, 'webhook', payload).
Manual / API
Direct call to POST /workspaces/:wId/spaces/:sId/executions with optional input payload.
API Endpoints
| Method | Path | Description |
|---|---|---|
GET | /workspaces/:wId/spaces/:sId/executions | List (supports ?status=, ?workflowId=) |
POST | /workspaces/:wId/spaces/:sId/executions | Trigger manually |
GET | /workspaces/:wId/spaces/:sId/executions/:id | Get execution detail |
POST | /workspaces/:wId/spaces/:sId/executions/:id/cancel | Cancel pending execution |
Status Transitions
Cancellation only works reliably for executions in pending status. Once a worker has started processing (running), cancellation is a best-effort signal.
Frontend
The executions page lives at /spaces/[spaceId]/executions. It displays a table with live status badges and links to individual execution detail pages at /spaces/[spaceId]/executions/[id].