Every manufacturing configuration in Apache OFBiz, from Bills of Materials to Production Runs, is stored across a set of interconnected database entities. Understanding those entities is what makes implementations predictable and troubleshooting straightforward.
The Manufacturing module in Apache OFBiz handles the full production lifecycle: defining product structures through Bills of Materials, sequencing operations through Routing, and executing work through Production Runs. Each of these concepts maps to specific entities in the database.
This guide walks through the core data model using a concrete example: manufacturing a skateboard. You will see how products and components are structured, how routings and tasks are defined, and how a production run ties everything together at execution time. The goal is to give developers and business analysts a clear picture of how manufacturing data is organized internally in Apache OFBiz.
The manufacturing module relies on a small set of core entities that work together to represent the full production process.
|
Entity |
Purpose |
|
Product |
Represents any item in the system, a finished good or raw material. Each product is uniquely identified by a productId. |
|
ProductAssoc |
Defines relationships between products. Used to link a finished product to its components, forming the BOM structure. |
|
WorkEffort |
Represents a task or activity. In manufacturing, it is used to define routing tasks and production run headers. Each step is stored as a separate WorkEffort record. |
|
WorkEffortAssoc |
Links routing records to their tasks, controlling execution sequence via the sequenceNum field. |
|
WorkEffortGoodStandard |
Defines the standard relationship between a work effort and the product it consumes or produces. Specifies whether the product is an input (PRUNT_PROD_NEEDED) or output (PRUN_PROD_DELIV). |
|
WorkEffortInventoryAssign |
Links inventory items (raw materials) to specific WorkEffort tasks, showing which materials are consumed at which step. |
|
WorkEffortInventoryProduced |
Records the finished goods created from a production run, connecting output to the task that produced it. |
|
WorkEffortStatus |
Tracks status transitions for a production run or task (Created, Running, Completed, etc.). |
Each entity plays a specific role. Products define what is being made. ProductAssoc defines what goes into it. WorkEffort records represent every stage of planning and execution, from routing tasks through to completed production runs. The WorkEffortGoodStandard entity is the bridge that connects products to work efforts, determining whether a product is consumed or produced at each step.
Let's look at the skateboard manufacturing example. The finished good is a complete skateboard built from a combination of raw materials and one sub-assembly.
In Apache OFBiz, every item in the product hierarchy, whether a finished good, sub-assembly, or raw material, is stored as a Product record. The relationships between them that form the BOM are stored as ProductAssoc records with productAssocTypeId set to MANUF_COMPONENT.
The skateboard product hierarchy looks like this:
|
Product ID |
Name |
Type |
BOM Level |
|
STC1005 |
Skateboard |
FINISHED_GOOD |
0 |
|
STC1001 |
Sticker |
RAW_MATERIAL |
1 |
|
STC1002 |
Warranty Card |
RAW_MATERIAL |
1 |
|
STC1003 |
Transfer |
RAW_MATERIAL |
1 |
|
STC1004 |
Deck |
FINISHED_GOOD |
1 |
|
STC2001 |
Glue |
RAW_MATERIAL |
2 |
|
STC2002 |
Face |
RAW_MATERIAL |
2 |
|
STC2003 |
Ply |
RAW_MATERIAL |
2 |
|
STC2004 |
Core |
RAW_MATERIAL |
2 |
BOM Level 0 is the finished product. Level 1 components are assembled directly into the skateboard. The Deck at Level 1 is itself a sub-assembly, built from the Level 2 components. This two-level structure means the system needs to resolve both the Deck's own BOM and the Skateboard's BOM when planning material requirements.
Each product record in Apache OFBiz captures the following key fields:
|
Field |
Description |
|
productId |
Unique identifier for the product. |
|
productTypeId |
Classifies the product as FINISHED_GOOD or RAW_MATERIAL. |
|
internalName |
Name used internally within the company (can differ from the display name). |
|
productName |
Display name visible to end users. |
|
isVirtual |
Y if this is a virtual template product used to group variants; N for standard or variant products. |
|
isVariant |
Y if this product is a variant tied to a virtual product; N for standalone or virtual products. |
BOM relationships are stored in ProductAssoc, one record per component link:
|
Field |
Description |
|
productId |
The parent product being assembled. |
|
productIdTo |
The component used in the parent product. |
|
productAssocTypeId |
Type of relationship. MANUF_COMPONENT indicates the component is used in manufacturing the parent. |
|
fromDate |
The date from which this BOM relationship is effective. |
|
quantity |
Quantity of the component required per unit of the parent product. |
For a detailed walkthrough of setting up BOMs in Apache OFBiz, refer to the Bill of Materials setup guide on the Apache OFBiz Confluence wiki.
A Routing defines the sequence of operations required to manufacture a product. Apache OFBiz supports multi-level routings, allowing complex manufacturing flows to be broken into parent-child routing processes.
Both WorkEffort entity records use the same entity but serve different roles based on their workEffortTypeId. A routing record groups task records together. The sequence in which tasks execute is controlled by the sequenceNum field in WorkEffortAssoc.
For the skateboard example, two routings are defined:
|
Routing ID |
Routing Name |
Associated Tasks |
|
STC1000 |
Skateboard Final Assembly |
STC1001 - Final Assembly |
|
STC1002 |
Deck Sub-Assembly |
STC1003 - Lamination, STC1004 - Shape Deck |
The Skateboard Final Assembly routing (STC1000) handles the top-level assembly with a single Final Assembly task. The Deck Sub-Assembly routing (STC1002) handles the intermediate product with two sequential tasks: Lamination followed by Shape Deck. Each routing is linked to its associated product via a WorkEffortGoodStandard record with type ROU_PROD_TEMPLATE.
Routings, routing tasks, production run headers, and production run tasks are all stored as WorkEffort records, differentiated by workEffortTypeId:
|
Field |
Description |
|
workEffortId |
Unique identifier for the routing, task, or production run. |
|
workEffortTypeId |
ROUTING for a routing group, ROU_TASK for individual routing tasks, PROD_ORDER_HEADER for a production run, PROD_ORDER_TASK for a production task. |
|
currentStatusId |
Current status of the record (e.g., ROU_ACTIVE, PRUN_RUNNING, PRUN_COMPLETED). |
|
workEffortPurposeTypeId |
Purpose of the work effort (e.g., ROU_MANUFACTURING, WEPT_PRODUCTION_RUN). |
|
workEffortName |
Human-readable name or description. |
|
quantityToProduce |
Target quantity for the production run or task. |
|
quantityProduced |
Actual quantity completed. |
|
estimatedStartDate / actualStartDate |
Planned and actual start timestamps. |
|
facilityId |
The warehouse or facility where production takes place. |
For a full conceptual overview of routing setup in Apache OFBiz, refer to the Routing setup guide on the Apache OFBiz Confluence wiki.
A Production Run is the execution record that brings the BOM and Routing together. It is the equivalent of a work order: a formal instruction to produce a specific quantity of a product using the defined materials and operations.
In Apache OFBiz, a production run is represented by a PROD_ORDER_HEADER WorkEffort record. Each task within the run is a PROD_ORDER_TASK record linked to the header as its parent. The system tracks status transitions across the lifecycle from creation through completion.
For the skateboard example, two production runs are executed:
|
Production Run ID |
Name |
Tasks Included |
Quantity |
Status |
|
10000 |
Deck Sub-Assembly |
Lamination, Shape Deck |
100 |
Completed |
|
10003 |
Skateboard Final Assembly |
Final Assembly |
100 |
Completed |
Production Run 10000 handles the Deck Sub-Assembly first, executing Lamination and Shape Deck tasks in sequence to produce 100 Deck units. Production Run 10003 then handles the Skateboard Final Assembly, consuming those 100 Decks along with the other raw materials to produce 100 finished skateboards.
5.1 How Material Consumption is Tracked
Material consumption at the task level is tracked through two entities:
In the Deck Sub-Assembly run, the Lamination task (10001) consumes Glue (STC2001), Face (STC2002), Ply (STC2003), and Core (STC2004) as PRUNT_PROD_NEEDED inputs. When the task completes, inventory assignment records confirm which lot or inventory items were actually consumed.
5.2 How Produced Finished Goods are Recorded
When a production task produces output, a WorkEffortInventoryProduced record is created, linking the finished or intermediate product back to the task that produced it. This is how inventory is updated at the end of a production run. For the Deck Sub-Assembly, 100 Deck units appear in inventory once the run completes. For the Skateboard Final Assembly, 100 finished skateboards are recorded as produced.
5.3 Production Run Status Flow
Each production run and task moves through a defined set of statuses stored in WorkEffortStatus records:
Each status change is timestamped, giving a complete audit trail of when each stage of production started and ended. This status history is stored separately in WorkEffortStatus records rather than overwriting a single status field, preserving the full lifecycle for reporting and troubleshooting.
To explore the complete demo data for the skateboard manufacturing example, including product records, BOM structure, routings, and production run data, visit the Demo Data for Skateboard Manufacturing page on the Apache OFBiz Confluence wiki.
The Apache OFBiz manufacturing data model is built around a small set of interconnected entities. Products define the catalog. ProductAssoc defines the BOM. WorkEffort records represent everything from routing tasks to production run execution. WorkEffortGoodStandard connects products to the work efforts that consume or produce them.
Understanding how these entities relate to each other makes it significantly easier to configure, customize, and troubleshoot manufacturing setups in Apache OFBiz. The skateboard example covers the full lifecycle: from a two-level BOM through multi-level routings to a completed production run with inventory tracking.
Looking to implement or optimize Apache OFBiz manufacturing for your operations? Connect with HotWax Systems to build a solution tailored to your production workflows.