Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Version: 1.0.0
Last Updated: 2026-01-11
Module: Forms & Workflow
Prefix:fw_
Tables: 54
Changelog
- 1.0.0 (2026-01-11): Initial ERD documentation
Overview
The Forms & Workflow module provides a flexible form builder, submission management, workflow automation, and approval routing capabilities used across all domain modules.Forms & Submissions ERD
Workflow Engine ERD
Approvals ERD
Automation ERD
Signatures ERD
Portal & Public Forms ERD
RLS Policy Coverage
| Table | SELECT | INSERT | UPDATE | DELETE | WITH CHECK | Status |
|---|---|---|---|---|---|---|
| fw_forms | ✅ | ✅ | ✅ | ✅ | ✅ | Complete |
| fw_form_versions | ✅ | ✅ | - | - | - | Version table |
| fw_form_submissions | ✅ | ✅ | ✅ | ✅ | ✅ | Complete |
| fw_workflows | ✅ | ✅ | ✅ | ✅ | ✅ | Complete |
| fw_workflow_versions | ✅ | ✅ | - | - | - | Version table |
| fw_workflow_instances | ✅ | ✅ | ✅ | ✅ | ✅ | Complete |
| fw_approval_requests | ✅ | ✅ | ✅ | ✅ | ✅ | Complete |
| fw_approval_history | ✅ | ✅ | - | - | - | Audit table |
| fw_signature_audit_log | ✅ | ✅ | - | - | - | Audit table |
| fw_portal_rate_limits | ✅ | - | - | - | - | Public read |
| fw_automation_logs | ✅ | ✅ | - | - | - | Audit table |
Key Tables
fw_forms
Form definitions with version control and module ownership.fw_form_submissions
Submitted form data with status tracking.fw_workflows
Workflow definitions with step-based execution.fw_approval_requests
Multi-step approval routing with delegation support.fw_automations
Event-driven automation rules.Helper Functions
| Function | Purpose |
|---|---|
fw_has_org_access(org_id, user_id) | Check FW module access |
fw_can_submit_form(form_id, user_id) | Check form submission permission |
fw_get_pending_approvals(user_id) | Get pending approval tasks |
fw_advance_workflow(instance_id) | Move workflow to next step |
Cross-Module Dependencies
- PF: Organizations, profiles, notifications
- HR: Leave requests, onboarding workflows
- RH: Intake forms, discharge workflows
- GR: Policy approval workflows
- FA: Bill approval workflows