Forms Builder - Bounded Context & System Boundaries
Define the operational scope, core/supporting/generic classification, out-of-scope boundaries, context mapping, and Anti-Corruption Layer for the Forms Builder domain.
Bounded Context & System Boundaries
The Forms Builder domain operates as an autonomous bounded context within the Obelaw enterprise ecosystem. It establishes explicit linguistic and functional boundaries around declarative form schema authoring, dynamic field component trees, directed acyclic dependency graphs, immutable schema versioning, multi-step draft sessions, and authoritative submission validation.
Establishing strict boundaries ensures that dynamic question structures, branching conditions, and response validations remain completely decoupled from specific database table migrations, downstream workflow step orchestration, physical file storage mechanics, and enterprise identity protocols.
1. Subdomain Classification & Strategic Investment
Applying the strategic classification methodology from Vlad Khononov’s Learning Domain-Driven Design, the capabilities of the dynamic forms space are partitioned based on business differentiation and technical complexity:
flowchart TD
subgraph CoreDomain["Core Domain: High Complexity & Strategic Differentiation"]
SchemaModeling["Declarative Schema Modeling & Component Hierarchy"]
DagEngine["Directed Acyclic Graph (DAG) Logic & Calculation Engine"]
VersionFreeze["The Schema Freeze Law & Version Governance"]
SubmissionValidation["Atomic Server-Side Submission Validation Engine"]
end
subgraph SupportingDomain["Supporting Domain: Custom Operational Capabilities"]
DraftSessionMgmt["Multi-Step Draft Session & Autosave State Machine"]
TabularProjection["Tabular Data Flattening & Export Projections"]
AccessQuotaPolicy["Form Access Control, Expiry & Submission Quotas"]
end
subgraph GenericDomain["Generic Domain: Standardized / Platform Services"]
UserIdentity["User Authentication & Access (IAM)"]
FileStorage["Binary File & Attachment Storage (S3 / Blob)"]
WorkflowOrchestration["Approval Chains & Workflow Routing (BPMN)"]
NotificationDispatch["Email & Webhook Notification Dispatch"]
PdfRendering["Document Print & PDF Generation Service"]
end
CoreDomain -.->|Coordinates with| SupportingDomain
SupportingDomain -.->|Integrates via ACL / Events with| GenericDomain
Strategic Classifications Explained
- Core Domain: Modeling abstract form components, calculating cycle-free conditional visibility graphs, enforcing immutable schema version freezing, and validating responses server-side form the intellectual core of the domain. These represent proprietary business logic requiring custom tactical modeling.
- Supporting Domain: Managing in-progress draft sessions, converting hierarchical nested responses into flat tabular projections (for Excel/CSV analysis), and enforcing submission quota caps are custom supporting capabilities tailored to enterprise productivity.
- Generic Domain: Identity authentication, binary storage of uploaded PDFs/images, downstream BPMN workflow routing, and email dispatch are standardized enterprise concerns. The Forms Builder integrates with them via formal Anti-Corruption Layers (ACL) and domain event contracts.
2. In-Scope Operational Capabilities
The Forms Builder bounded context is strictly responsible for the following domain capabilities:
- Declarative Form Schema Authoring: Constructing hierarchical form structures composed of Pages, Sections, and typed Field Controls (Text, Number, Date, Time, Single-Choice Radio/Select, Multiple-Choice Checkbox, Switch, File Upload, Digital Signature, Computed/Formula, Rating Scale, and Matrix/Repeater).
- Conditional Visibility & Logic Graph Evaluation: Modeling and validating rules that dynamically display, hide, require, or disable fields based on user answers, guaranteeing cycle-free evaluation via Directed Acyclic Graphs (DAG).
- Dynamic Field Calculation & Formula Processing: Computing values in real-time based on mathematical expressions (e.g., summing matrix rows, calculating BMI from height and weight, determining risk scores).
- Schema Versioning & Immutability Governance: Enforcing the transition of schema versions through
Draft,ActivePublished,Deprecated, andArchivedstates, permanently freezing any schema that has collected live submissions. - Multi-Step Draft Session State Machine: Managing progressive user submissions, persisting unsubmitted draft state, verifying step-level completion gates, and issuing cryptographically signed resumption tokens.
- Authoritative Submission Ingestion & Validation: Re-evaluating submitted payloads server-side against the exact historical schema version, validating regex patterns, numerical ranges, mandatory field rules, and computing tamper-evident response hashes.
- Contextual Data Hydration: Populating initial form field values from external enterprise data tokens without coupling form blueprints to external database columns.
- Submission Access Control & Quota Management: Enforcing access restrictions (public, authenticated, single-use token, password-protected), expiration timestamps, and maximum submission limits.
3. Out-of-Scope Boundaries
To maintain domain purity and prevent monolithic coupling, the Forms Builder context explicitly excludes external enterprise responsibilities:
| Out-of-Scope Concern | Correct Ownership | Architectural Rationale |
|---|---|---|
| User authentication, credential verification, and enterprise SSO/SAML policies | Identity & Access Management (IAM) | Forms Builder consumes verified submitter IDs via an ACL; IAM owns user directories, password hashing, and OAuth tokens. |
| Physical binary storage of uploaded documents, images, and attachments | Object Storage Service (S3 / Blob) | Forms Builder stores file metadata (storage key, byte size, MIME type, cryptographic checksum); Object Storage owns physical binary blocks. |
| Multi-tier managerial approvals, task assignments, and BPMN workflow choreography | Workflow / BPMN Engine | Forms Builder emits FormSubmissionValidated; the Workflow engine decides which department approves or reviews the submission. |
| ERP transactional ledger mutations, order creation, and invoice generation | Sales / Purchase / Accounting Domains | Forms Builder captures raw business intake; operational domains ingest validated submission events and translate them into domain orders. |
| Pixel-perfect PDF report rendering, watermark styling, and document printing | Document Generation Service | Forms Builder provides raw structured data; Document Generation renders styled print layouts. |
| Bulk email distribution, SMS gateways, and marketing notification dispatch | Notification Engine | Forms Builder emits domain events; Notification Engine manages SMTP delivery, bounce rates, and communication templates. |
4. Context Mapping & Integration Relationships
The Forms Builder bounded context interacts with surrounding enterprise domains through formal DDD relationships:
flowchart LR
IAM["IAM / Identity"] -->|Customer-Supplier<br/>Upstream to Downstream| FORMS["Forms Builder Context"]
STORAGE["Object Storage Service"] <-->|Anti-Corruption Layer<br/>Presigned Tokens| FORMS
FORMS -->|Customer-Supplier<br/>Upstream to Downstream| BPMN["Workflow / BPMN Engine"]
FORMS -->|Customer-Supplier<br/>Upstream to Downstream| ERP["ERP / Core Domains"]
FORMS -->|Published Language<br/>Tabular Projections| ANALYTICS["Data Lake & BI"]
Integration Relationship Details
| Integrating Context | Relationship Type | Interaction Pattern | Business Purpose |
|---|---|---|---|
| IAM / Identity | Upstream (IAM) to Downstream (Forms) | Customer-Supplier | Forms Builder validates user authorization and captures verified submitter identity for restricted forms. |
| Object Storage Service | Bidirectional | Anti-Corruption Layer (ACL) | Forms Builder issues presigned upload URLs and verifies file upload receipts without handling binary streams directly. |
| Workflow / BPMN Engine | Upstream (Forms) to Downstream (BPMN) | Customer-Supplier | Forms Builder publishes FormSubmissionValidated events, triggering automated business approval workflows. |
| ERP & Operational Domains | Upstream (Forms) to Downstream (ERP) | Customer-Supplier | Operational contexts (CRM, Procurement, HR) ingest validated form answers to instantiate enterprise entities. |
| Data Lake & Analytics | Upstream (Forms) to Downstream (Analytics) | Published Language (PL) | Provides flattened, schema-mapped tabular projections for business intelligence without exposing internal aggregate structures. |
5. Anti-Corruption Layer (ACL) Specifications
To safeguard the Forms Builder domain from foreign schemas and infrastructure dependencies, explicit Anti-Corruption Layers translate external inputs:
1. Submitter Identity ACL
The Forms Builder context must never depend on the schema of user tables or employee directories:
- Accepts external identity tokens from IAM.
- Maps them into a lightweight
SubmitterContextValue Object containing:SubmitterType(Anonymous,AuthenticatedUser,InvitedGuest),SubmitterReferenceId,TenantId, andAssignedRoles. - Enforces access policy validation within the form aggregate without querying internal IAM database tables.
2. Object Storage Asset ACL
File uploads present significant security and bandwidth risks if handled directly by the application server:
- When a user initiates a file upload control, the ACL requests a short-lived presigned upload URL from the Object Storage service.
- Upon upload completion, the ACL validates the asset receipt: verifies expected file extension against field constraints, checks maximum byte thresholds, and computes an SHA-256 integrity hash.
- Binds the resulting
FileAssetDescriptorvalue object into the form answer payload, maintaining zero direct file handle dependencies.
3. Contextual Data Hydration ACL
Enterprise forms often require pre-population with data from external records (e.g., pulling a customer’s address from CRM or an asset’s serial number from Inventory):
- Defines an abstract
HydrationDataProvidercontract using a standardized parameter map. - External adapters translate source domain entities into key-value pairs matching designated
FieldIdentifierhydration tokens. - Ensures that if the upstream CRM schema changes, only the external adapter requires modification; the form schema blueprint remains untouched.