Edge Function: workflow-executor-worker
Trigger: pg_cron (every minute)Auth: Service role (via
util.invoke_edge_function)
Response Contract
Error Response
RPC: fw_enqueue_form_submission_automation
Purpose: User-callable enqueue path for form-submission automation (Path A fallback).
Signature
Parameters
Returns
UUID of the createdfw_workflow_executions record, or NULL if no matching rules found.
RPC: fw_claim_queued_executions
Purpose: Fallback claim path when pgmq is unavailable. Uses FOR UPDATE SKIP LOCKED.
Signature
Parameters
Behavior
- Selects
fw_workflow_executionswithstatus IN ('queued', 'retry_pending')andnext_retry_at <= now() - Locks rows with
FOR UPDATE SKIP LOCKED - Updates status to
running - Returns claimed records