In-House MRP - Bounded Context & System Boundaries
Define the operational scope, boundaries, and anti-corruption layer for the In-House Manufacturing & Work Orders domain.
Bounded Context & System Boundaries
The In-House Manufacturing & Work Order Management domain operates as a dedicated bounded context within the Obelaw open-core ERP ecosystem. It governs the internal conversion of raw materials, components, and semi-finished goods into finished or intermediate products through controlled shop-floor execution, Bill of Materials (BOM) engineering, routing design, and work order lifecycle management.
By maintaining strict boundaries, the domain ensures that production plans, capacity commitments, material consumption, labor absorption, and yield variances remain traceable, auditable, and decoupled from commercial, procurement, warehousing, and financial concerns.
1. Operational Scope
The In-House Manufacturing domain is strictly responsible for the internal execution of production activity:
- Bill of Materials (BOM) Management: Versioned, multi-level formulation structures that define the material, component, and sub-assembly composition of a finished or semi-finished product.
- Routing & Operation Design: Sequenced manufacturing operations, work center assignments, setup times, run times, and machine/tooling requirements.
- Work Center & Capacity Modeling: Shop-floor resource definitions, including production lines, work centers, machines, tooling, labor crews, and calendarized capacity.
- Manufacturing Order (MO) / Work Order (WO) Lifecycle: Planning, confirmation, scheduling, execution, inspection, completion, and closure of internal production runs.
- Material Issuance & Consumption: Hard staging, backflushing, and floor-stock consumption of raw materials and components against a production order.
- Time Logging & Labor Tracking: Operator attendance, setup time, run time, indirect time, and skill-based labor charging.
- Scrap, Rework & Yield Tracking: Recording production losses, defect quantities, quarantine decisions, rework orders, and expected-vs-actual yield analysis.
- By-Product & Co-Product Handling: Capturing secondary outputs from a production run, including their valuation, custody transfer, and disposition.
2. Out-of-Scope Boundaries
To preserve domain purity and prevent architectural coupling, the In-House Manufacturing context explicitly excludes the following business operations:
| Out-of-Scope Concern | Correct Ownership | Rationale |
|---|---|---|
| Customer order negotiation, sales contracts, pricing, and delivery promises | Sales / OMS | Manufacturing reacts to approved demand (forecasts, sales orders, replenishment plans), but it does not own commercial relationships or pricing. |
| Raw material vendor procurement, purchase orders, and supplier invoices | Purchasing / Procurement | Manufacturing requests material availability; Procurement owns vendor selection, purchase orders, and inbound receipts. |
| Physical putaway, bin-level picking, warehouse slotting, and stock location optimization | Inventory / WMS | Manufacturing emits material requests and consumption events; WMS owns the physical custody, bin topology, and stock movements. |
| External tolling, co-packing, subcontractor custody, and vendor conversion fees | Subcontracting / Toll Manufacturing | In-House Manufacturing executes only on company-owned premises; external conversion is a separate bounded context. |
| General Ledger postings, WIP capitalization, cost-of-goods-sold recognition, and financial period close | Accounting / FMS | Manufacturing emits cost and completion facts; FMS owns double-entry ledger postings and capitalization rules. |
| Machine maintenance scheduling, breakdown ticketing, and preventive maintenance planning | Maintenance / CMMS | Manufacturing reports machine downtime and usage; CMMS owns maintenance workflows and asset health. |
| Product catalog enrichment, SKU attributes, and customer-facing specifications | Product Information Management (PIM) / Catalog | Manufacturing consumes approved item masters and BOM revisions; it does not own commercial product data. |
In-House Manufacturing may emit events consumed by these contexts, but it never owns their workflows, ledger policies, or physical custody rules.
3. Context Mapping & Integration Relationships
The In-House Manufacturing Bounded Context interacts with external contexts through explicit, formal DDD relationship patterns. This ensures that operational changes in upstream or downstream domains do not corrupt internal production logic.
| Integrating Context | Relationship Type | Interaction Pattern | Business Purpose |
|---|---|---|---|
| Sales / OMS | Upstream (Sales) to Downstream (Manufacturing) | Customer-Supplier | Manufacturing reacts to approved sales orders and forecast plans to generate Manufacturing Orders. |
| Procurement | Upstream (Procurement) to Downstream (Manufacturing) | Customer-Supplier | Manufacturing consumes procurement commitments to confirm material availability for planned production. |
| Inventory / WMS | Bidirectional | Partner | Manufacturing requests material staging and reports consumption; WMS owns bin-level issuance, floor-stock transfers, and finished goods receipt. |
| PIM / BOM | Upstream (PIM/BOM) to Downstream (Manufacturing) | Customer-Supplier | Manufacturing consumes approved item masters, BOM revisions, and routing designs. |
| Accounting / FMS | Upstream (Manufacturing) to Downstream (FMS) | Customer-Supplier | Manufacturing emits cost capitalization facts so FMS can post WIP, labor, overhead, and FG inventory entries. |
| Maintenance / CMMS | Upstream (Manufacturing) to Downstream (CMMS) | Customer-Supplier | Manufacturing emits machine downtime and utilization events so CMMS can trigger maintenance workflows. |
| Subcontracting | Peer | Published Language | Subcontracting and In-House Manufacturing share BOM and routing semantics but execute on different custody models. |
Integration Responsibilities
- Sales / OMS owns demand authorization and delivery promises. It does not decide how or where production is executed.
- Procurement owns supplier contracts and inbound material commitments. It does not calculate BOM consumption or yield variances.
- Inventory / WMS owns physical custody, bin locations, and stock buckets. It does not decide routing sequences or operation start/stop times.
- PIM / BOM owns item masters, BOM revisions, and formulation versions. It does not execute work orders or report shop-floor time.
- Accounting / FMS owns ledger postings and capitalization rules. It does not calculate machine run hours or material scrap factors.
- Maintenance / CMMS owns asset health and maintenance workflows. It does not manage production schedules or labor time logs.
4. Domain Isolation & Anti-Corruption Layer (ACL)
In-House Manufacturing communicates with the rest of the ecosystem asynchronously through domain events and lightweight polymorphic references. It never holds direct foreign keys to operational tables owned by Sales, Procurement, Inventory, PIM, Accounting, or Maintenance.
Zero Direct Database Mappings
- No Shared Foreign Keys: Manufacturing tables (Manufacturing Orders, Routing Operations, Work Center Calendars, Time Logs, Consumption Lines) contain no foreign keys pointing directly to sales orders, purchase orders, warehouse bins, inventory lots, GL accounts, or vendor master records.
- Polymorphic Reference Mappings (Morph Aliases): Relationships to external documents are linked using generic, string-based polymorphic fields (
Source TypeandSource Alias). A Manufacturing Order may reference aSalesOrder, aDemandPlan, aReplenishmentOrder, or aProcurementCommitmentwithout database-level coupling.
The Anti-Corruption Layer (ACL) Translation Engine
The ACL acts as a bidirectional translator on the context boundary:
- Inbound Translation (Demand Signal → Manufacturing Order DTO): Translates approved sales orders, forecasts, or replenishment signals into internal Manufacturing Orders with required quantities, due dates, and BOM/routing references.
- Inbound Translation (BOM Revision → Production Recipe): Converts an approved BOM revision and routing design into an internal production recipe used for material reservation, operation sequencing, and capacity planning.
- Inbound Translation (Inventory Availability → Allocation Status): Translates WMS stock availability into manufacturing allocation states without exposing bin-level details to production logic.
- Outbound Translation (Consumption Confirmed → Cost Capitalization Payload): Translates material issues, labor time logs, and overhead absorption into cost capitalization instructions for FMS.
- Outbound Translation (Production Completed → Inventory Receipt Payload): Translates finished goods output, scrap, and by-product quantities into WMS receiving instructions.
- Outbound Translation (Machine Downtime → Maintenance Trigger): Translates machine stoppage events into CMMS maintenance request payloads.
Because the ACL owns all cross-boundary translations, changes to the Sales, Procurement, Inventory, PIM, Accounting, or Maintenance schemas do not force changes to In-House Manufacturing internals.