Status: ✅ Implemented
Spec: FW-45-decision-tables.md
Last Updated: 2026-03-16
Overview
FW-45 introduces configurable decision tables for workflow and rule evaluation use cases. The feature integrates with Platform Foundation tenancy and permissions, and with existing Forms & Workflow modules for condition evaluation, workflow execution, and version-safe runtime behavior.Integration Points (from Spec)
Scheduled Processing Contract
Event / API Contracts
- Edge Function:
evaluate-decision-table— ✅ Implemented- Request:
tableId,facts, optionalversionId, optionalevaluation_context(workflow_step|form_validation|api_request), optionalsource_execution_id,source_step_id. - Response:
success,matched,matchedRuleCount,outputs,evaluationId,versionNumber,hitPolicy,correlationId, optionalerror. - Auth:
validateAuth()+verifyOrgAccess()via_shared/auth.ts. - Audit: Writes via
fw_log_decision_table_evaluationRPC under user auth context. Failures are non-fatal (logged, not returned as errors).
- Request:
- Persistence Contract:
- Writes audit entries to
fw_rule_evaluationsfor server-side evaluations only. - Client-side test mode does not write audit rows.
- Writes audit entries to
Security and Tenant Isolation
- All mutations and reads are tenant-scoped with
organization_id. - RLS is enabled on
fw_decision_tables,fw_decision_table_versions, andfw_rule_evaluations. - Permission checks enforce least-privilege access for view/manage operations.