Skip to main content
Prefix: fw_
Table Count: 54
Last Updated: 2026-01-10

Overview

The FW module provides a comprehensive form builder and workflow automation engine, including form design, submissions, approval workflows, automation rules, and analytics.

Table Categories

1. Form Builder (6 tables)

Form Status:
  • draftpublishedarchived
Field Types:
Form Schema Example:

2. Form Submissions (5 tables)

Submission Data Storage:

3. Workflow Engine (8 tables)

Workflow Definition Schema:

4. Workflow Execution (4 tables)

Execution Status:
  • pendingrunningcompleted
  • failed, cancelled, paused

5. Approvals (7 tables)

Approval Step Types:
  • single - One approver required
  • all - All approvers must approve
  • any - Any approver can approve
  • percentage - X% must approve
Approval Decision Flow:

6. Automation Rules (4 tables)

Action Types:

7. Alerts & Notifications (5 tables)

8. Analytics (2 tables)

Tracked Metrics:
  • Execution time per step
  • Bottleneck identification
  • Approval turnaround time
  • Error rates by step type

9. Testing & Debugging (6 tables)

10. Integration (2 tables)

11. Public Portal (3 tables)

12. Security (1 table)

13. Module Settings (1 table)

Key Settings:

Common Query Patterns

Get Form with Fields

Get Pending Approvals

Get Workflow Execution Status

Get Form Submissions


RLS Policies

FW uses multi-level RLS:
  1. Organization isolation via organization_id
  2. Form-level permissions via fw_form_permissions
  3. Submission access based on form settings
  4. Approval access for assigned approvers
Helper Functions:
  • fw_user_can_view_form() - Form view permission
  • fw_user_can_submit_form() - Submission permission
  • fw_user_can_approve() - Approval assignment check

Platform Integration

Forms are accessed via Platform Integration Layer:

See Also