DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
- Created by Yashwant Dhakad, last modified on Jul 15, 2025
Introduction
Imagine you're setting up a production process to manufacture skateboards, each one built from components like decks, transfer, stickers, and more. Apache OFBiz makes this possible through its powerful Manufacturing module, which supports everything from defining product structures to tracking finished goods through production runs.
In Apache OFBiz, a production run is what many manufacturing systems refer to as a work order, a formal instruction to produce a specific quantity of a product using defined materials and processes. But for developers and business analysts alike, the real challenge often lies beneath the surface, understanding how the data flows behind these processes.
This guide is designed to help you do just that. It explains the core data model that powers manufacturing in Apache OFBiz. You’ll learn how products, Bills of Materials (BOMs), routing tasks, and production runs are structured and connected. By exploring real-world examples and key entities, this guide demystifies how Apache OFBiz represents manufacturing data internally, so you can customize it more confidently and align it with your specific business needs.
Whether you're configuring a new setup or troubleshooting an existing one, this documentation will give you a clear view into how manufacturing data is organized and used in Apache OFBiz.
Key Terms
Understanding the following entities is essential when working with manufacturing data in Apache OFBiz:
- Product
Represents any item in the system either a finished good or a raw material. Each product is uniquely identified by a productId. - ProductAssoc
Defines relationships between products. It’s commonly used to link a finished product to its components, forming the structure of a Bill of Materials (BOM). - WorkEffort
Represents a task or activity. In the manufacturing module, it’s used to define routing tasks or an entire production run (work order). Each step in the process is stored as a separate WorkEffort record. - WorkEffortInventoryAssign
Links inventory items (raw materials or components) to specific WorkEffort tasks. This shows which materials are consumed during which step of the production process. - WorkEffortInventoryProduced
Records the finished goods created from a production run. It connects the output product to the task that produced it, enabling inventory tracking. - WorkEffortGoodStandard: Defines the standard relationship between a work effort (routing or production run) and the product it consumes or produces. It specifies whether the product is an input (PRUNT_PROD_NEEDED) or output (PRUN_PROD_DELIV).
Prerequisites
Before starting, ensure you have a working Apache OFBiz instance with the Manufacturing module enabled. The module relies on entities defined in the Apache OFBiz framework, such as Product and WorkEffort. Loading the demo data provides sample products and configurations to follow this example.
Developer Notes
- Apache OFBiz Setup: Use the latest Apache OFBiz version (e.g., trunk or stable release) with Java 17 SDK, as outlined in the Apache OFBiz Technical Production Setup Guide. The demo data includes pre-configured entities required for manufacturing.
- Entity Engine: Apache OFBiz’s Entity Engine manages data persistence via XML-defined entities (e.g., entitymodel.xml in framework/entity). Key entities for manufacturing include Product, ProductAssoc, and WorkEffort.
- Accessing the Manufacturing Module: Log in to the Apache OFBiz web application (e.g., https://your-ofbiz-instance/manufacturing) using default admin credentials (user: admin, password: ofbiz). Change these credentials in production for security.
1. Defining the Product
To assemble a Skateboard in Apache OFBiz, define its components using the Product and ProductAssoc entities. The Skateboard (STC1005) comprises components like Sticker, Warranty Card, Transfer, and Deck (a sub-assembly composed of Glue, Face, Ply, and Core), modeled as a Bill of Materials (BOM). The table below outlines the product hierarchy, with BOM Level indicating the hierarchy (0 for the final product, 1 for direct components, 2 for sub-components of the Deck).
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 |
1.1 Steps to Define the Product Components
Note: These steps are intended for developers or individuals familiar with Apache OFBiz.
To understand the basic concept and steps for setting up a Bill of Material (BOM), please refer to this introductory document.
- Create the Main Product:
In the Catalog Manager (e.g., https://your-ofbiz-instance/catalog/control/EditProduct), create a product for the Skateboard (productId: STC1005, productTypeId: FINISHED_GOOD). - Create Component Products:
Define components as products (e.g., Sticker, Warranty Card, Transfer, Deck, Glue, Face, Ply, Core) with productTypeId set to RAW_MATERIAL, except for Deck (FINISHED_GOOD). Refer to the table above for details. - Define the Bill of Materials (BOM):
Use the ProductAssoc entity to define BOM relationships, linking components to the Skateboard and Deck with productAssocTypeId: MANUF_COMPONENT and quantity: 1, as shown in the XML below.
1.2 Sample Data for Product and BOM
This XML data is generated after Step 4.5 of the Skateboard BOM setup in Apache OFBiz.
<?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml> <!-- Main Product: Skateboard --> <Product productId="STC1005" productTypeId="FINISHED_GOOD" internalName="Skateboard" productName="Skateboard" isVirtual="N" isVariant="N"/> <!-- Sub-Assembly: Deck --> <Product productId="STC1004" productTypeId="FINISHED_GOOD" internalName="Deck" productName="Deck" isVirtual="N" isVariant="N"/> <!-- Raw Materials --> <Product productId="STC1001" productTypeId="RAW_MATERIAL" internalName="Sticker" productName="Sticker" isVirtual="N" isVariant="N"/> <Product productId="STC1002" productTypeId="RAW_MATERIAL" internalName="Warranty Card" productName="Warranty Card" isVirtual="N" isVariant="N"/> <Product productId="STC1003" productTypeId="RAW_MATERIAL" internalName="Transfer" productName="Transfer" isVirtual="N" isVariant="N"/> <Product productId="STC2001" productTypeId="RAW_MATERIAL" internalName="Glue" productName="Glue" isVirtual="N" isVariant="N"/> <Product productId="STC2001" productTypeId="RAW_MATERIAL" internalName="Face" productName="Face" isVirtual="N" isVariant="N"/> <Product productId="STC2003" productTypeId="RAW_MATERIAL" internalName="Ply" productName="Ply" isVirtual="N" isVariant="N"/> <Product productId="STC2004" productTypeId="RAW_MATERIAL" internalName="Core" productName="Core" isVirtual="N" isVariant="N"/> <!-- BOM Associations: Deck Composition --> <ProductAssoc productId="STC1004" productIdTo="STC2001" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> <ProductAssoc productId="STC1004" productIdTo="STC2002" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> <ProductAssoc productId="STC1004" productIdTo="STC2003" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> <ProductAssoc productId="STC1004" productIdTo="STC2004" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> <!-- BOM Associations: Skateboard Assembly --> <ProductAssoc productId="STC1005" productIdTo="STC1004" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> <ProductAssoc productId="STC1005" productIdTo="STC1001" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> <ProductAssoc productId="STC1005" productIdTo="STC1002" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> <ProductAssoc productId="STC1005" productIdTo="STC1003" productAssocTypeId="MANUF_COMPONENT" fromDate="2025-07-07 12:00:00.000" quantity="1"/> </entity-engine-xml> |
1.3 Developer Notes
- Entity Relationships: The ProductAssoc entity defines BOM relationships with productAssocTypeId=MANUF_COMPONENT. Check entitymodel.xml in applications/product/entitydef for definitions.
- Data Import: Use WebTools (e.g., https://your-ofbiz-instance/webtools/control/EntityImport) to import the XML snippet, populating the Product and ProductAssoc tables.
1.4 Entity Field Descriptions
<Product>
Defines a product, sub-assembly, or raw material.
- productId: Unique product identifier given to each product.
- productTypeId: Type of product for each product like product is Raw material or Finished Good (FINISHED_GOOD, RAW_MATERIAL).
- internalName: This name is used within the company for internal purposes. Some business uses two different name, to show the product name like ply and internal name = plyboard
- productName: Display name for the end user.
- isVirtual: Indicates whether the product is a virtual (template) product used to group feature-based variants (Y for virtual, N for regular or variant products).
- isVariant: Indicates whether the product is a variant tied to a virtual product (Y for variant, N for standalone or virtual products).).
<ProductAssoc>
Defines component relationships used in the Bill of Materials (BOM).
- productId: Parent product being assembled.
- productIdTo: Component used in the parent product.
- productAssocTypeId: Type of relationship (MANUF_COMPONENT for BOM).
- MANUF_COMPONENT: This product is a component used in the manufacture of another product.
- fromDate: Start date of the association.
- quantity: Quantity of the component used.
2. Configuring Manufacturing Routing & Tasks
Note: These steps are intended for developers or individuals familiar with Apache OFBiz.
To understand the basic concept and steps for routing and routing tasks in Apache OFBiz , please refer to this introductory document.
Apache OFBiz supports multi-level routings, allowing complex manufacturing flows to be broken into parent-child routing processes. This section sets up two routings:
- Skateboard Final Assembly (STC1000): For the final Skateboard assembly.
- Deck Sub-Assembly (STC1002): For the Deck sub-assembly.
2.1 Routing Process
Routing ID | Routing Name | Associated Tasks |
STC1000 | Skateboard Final Assembly | STC1001 – Final Assembly |
STC1002 | Deck Sub-Assembly | STC1003 – Lamination, STC1004 – Shape Deck |
2.2 Routing and Routing Tasks in XML
This data is generated after Step 4.2 of setting up of routing in the Apache OFBiz.
<?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml> <!-- ============================================ --> <!-- Skateboard Final Assembly: Routing & Related --> <!-- ============================================ --> <!-- Routing --> <WorkEffort workEffortId="STC1000" workEffortTypeId="ROUTING" currentStatusId="ROU_ACTIVE" workEffortName="Skateboard Final Assembly"/> <!-- Task --> <WorkEffort workEffortId="STC1001" workEffortTypeId="ROU_TASK" currentStatusId="ROU_ACTIVE" workEffortPurposeTypeId="ROU_MANUFACTURING" workEffortName="Final Assembly"/> <!-- Association --> <WorkEffortAssoc workEffortIdFrom="STC1000" workEffortIdTo="STC1001" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="10" fromDate="2025-07-07 12:00:00.000"/> <!-- Product Template Link --> <WorkEffortGoodStandard workEffortId="STC1000" productId="STC1005" workEffortGoodStdTypeId="ROU_PROD_TEMPLATE" fromDate="2025-04-18 09:34:27.398"/> <!-- ======================================== --> <!-- Deck Sub-Assembly: Routing & Related --> <!-- ======================================== --> <!-- Routing --> <WorkEffort workEffortId="STC1002" workEffortTypeId="ROUTING" currentStatusId="ROU_ACTIVE" workEffortName="Deck Sub-Assembly"/> <!-- Tasks --> <WorkEffort workEffortId="STC1003" workEffortTypeId="ROU_TASK" currentStatusId="ROU_ACTIVE" workEffortPurposeTypeId="ROU_MANUFACTURING" workEffortName="Lamination"/> <WorkEffort workEffortId="STC1004" workEffortTypeId="ROU_TASK" currentStatusId="ROU_ACTIVE" workEffortPurposeTypeId="ROU_MANUFACTURING" workEffortName="Shape Deck"/> <!-- Associations --> <WorkEffortAssoc workEffortIdFrom="STC1002" workEffortIdTo="STC1003" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="10" fromDate="2025-07-07 12:00:00.000"/> <WorkEffortAssoc workEffortIdFrom="STC1002" workEffortIdTo="STC1004" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="20" fromDate="2025-07-07 12:00:00.000"/> <!-- Product Template Link --> <WorkEffortGoodStandard workEffortId="STC1002" productId="STC1004" workEffortGoodStdTypeId="ROU_PROD_TEMPLATE" fromDate="2025-03-31 18:30:00.000"/> </entity-engine-xml> |
2.3 Explanation of the Process
- STC1000: Top-level routing for the Skateboard final assembly, including the Final Assembly task (STC1001).
- STC1002: Routing for the Deck sub-assembly, including sequential tasks Lamination (STC1003) and Shape Deck (STC1004).
- Each routing uses WorkEffortAssoc with ROUTING_COMPONENT to maintain the correct sequence of operations.
- This process supports nesting: STC1002 can be linked as a sub-routing in a larger production run if needed.
2.4 Developer Notes
- Routing Configuration: Routings are defined using WorkEffort entities with workEffortTypeId=ROUTING and tasks with workEffortTypeId=ROU_TASK.
- Sequence Control: The sequenceNum attribute in WorkEffortAssoc determines task order.
2.5 Entity Field Descriptions
<WorkEffort>
Defines a routing or task used in the manufacturing process.
- workEffortId: Unique identifier for the routing or task.
- workEffortTypeId: Type of work (ROUTING for a group of tasks, ROU_TASK for individual tasks).
- currentStatusId: Status of the work effort (ROU_ACTIVE means active).
- workEffortPurposeTypeId: Purpose of the task (e.g., ROU_MANUFACTURING for production tasks).
- workEffortName: Name or description of the routing or task.
<WorkEffortAssoc>
Defines the sequence and association between routing and its tasks.
- workEffortIdFrom: Parent routing (group of tasks).
- workEffortIdTo: Linked task within the routing.
- workEffortAssocTypeId: Type of association (ROUTING_COMPONENT means the task is part of the routing).
- sequenceNum: Execution order of the task within the routing.
- fromDate: Start date of this association.
<WorkEffortGoodStandard>
Links a routing to a specific product.
- workEffortId: The routing linked to the product.
- productId: Product manufactured using this routing.
- workEffortGoodStdTypeId: Role of this link (ROU_PROD_TEMPLATE specifies it's a routing template for the product).
- fromDate: Effective date of the link.
3. Creating and Executing Production Runs
Note: Refer to this guide to understand the steps involved in executing a Production Run in Apache OFBiz.
A Production Run models the manufacturing process based on a routing, containing a Production Run Header (PROD_ORDER_HEADER) and Production Run Tasks (PROD_ORDER_TASK). Each run records scheduling, quantities, and execution details.
3.1 Overview of Production Runs
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 |
3.2 Demo Data: Production Run & Task Execution
This data is generated after Step 3.9 of executing the production run in Apache OFBiz.
<<?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml> <!-- Production Run: Deck Sub-Assembly --> <WorkEffort workEffortId="10000" workEffortTypeId="PROD_ORDER_HEADER" currentStatusId="PRUN_COMPLETED" workEffortPurposeTypeId="WEPT_PRODUCTION_RUN" workEffortName="Deck Sub-Assembly" estimatedStartDate="2025-07-07 12:20:26.000" estimatedCompletionDate="2025-07-07 12:20:26.200" actualStartDate="2025-07-07 12:23:11.676" actualCompletionDate="2025-07-07 12:23:24.901" facilityId="WebStoreWarehouse" quantityToProduce="100" revisionNumber="5"/> <WorkEffortStatus workEffortId="10000" statusId="PRUN_CREATED" statusDatetime="2025-07-07 12:21:36.614"/> <WorkEffortStatus workEffortId="10000" statusId="PRUN_DOC_PRINTED" statusDatetime="2025-07-07 12:23:06.264"/> <WorkEffortStatus workEffortId="10000" statusId="PRUN_RUNNING" statusDatetime="2025-07-07 12:23:11.679"/> <WorkEffortStatus workEffortId="10000" statusId="PRUN_COMPLETED" statusDatetime="2025-07-07 12:23:24.903"/> <WorkEffortGoodStandard workEffortId="10000" productId="STC1004" workEffortGoodStdTypeId="PRUN_PROD_DELIV" fromDate="2025-07-07 12:20:26.0" statusId="WEGS_CREATED" estimatedQuantity="100.0"/> <!-- Task: Lamination --> <WorkEffort workEffortId="10001" workEffortTypeId="PROD_ORDER_TASK" currentStatusId="PRUN_COMPLETED" workEffortPurposeTypeId="WEPT_PRODUCTION_RUN" workEffortParentId="10000" workEffortName="Lamination" priority="10" estimatedStartDate="2025-07-07 12:20:26.000" estimatedCompletionDate="2025-07-07 12:20:26.100" actualStartDate="2025-07-07 12:23:11.659" actualCompletionDate="2025-07-07 12:23:19.828" quantityToProduce="100" quantityProduced="100"/> <WorkEffortStatus workEffortId="10001" statusId="PRUN_CREATED" statusDatetime="2025-07-07 12:21:36.684"/> <WorkEffortStatus workEffortId="10001" statusId="PRUN_DOC_PRINTED" statusDatetime="2025-07-07 12:23:06.285"/> <WorkEffortStatus workEffortId="10001" statusId="PRUN_RUNNING" statusDatetime="2025-07-07 12:23:11.662"/> <WorkEffortStatus workEffortId="10001" statusId="PRUN_COMPLETED" statusDatetime="2025-07-07 12:23:20.102"/> <WorkEffortGoodStandard workEffortId="10001" productId="STC2001" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:15:57.0" statusId="WEGS_COMPLETED" estimatedQuantity="100.0"/> <WorkEffortGoodStandard workEffortId="10001" productId="STC2002" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:16:06.0" statusId="WEGS_COMPLETED" estimatedQuantity="100.0"/> <WorkEffortGoodStandard workEffortId="10001" productId="STC2003" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:16:21.0" statusId="WEGS_COMPLETED" estimatedQuantity="100.0"/> <WorkEffortGoodStandard workEffortId="10001" productId="STC2004" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:16:40.0" statusId="WEGS_COMPLETED" estimatedQuantity="100.0"/> <!-- Task: Shape Deck --> <WorkEffort workEffortId="10002" workEffortTypeId="PROD_ORDER_TASK" currentStatusId="PRUN_COMPLETED" workEffortPurposeTypeId="WEPT_PRODUCTION_RUN" workEffortParentId="10000" workEffortName="Shape Deck" priority="20" estimatedStartDate="2025-07-07 12:20:26.100" estimatedCompletionDate="2025-07-07 12:20:26.200" actualStartDate="2025-07-07 12:23:22.866" actualCompletionDate="2025-07-07 12:23:24.881" quantityToProduce="100" quantityProduced="100"/> <WorkEffortStatus workEffortId="10002" statusId="PRUN_CREATED" statusDatetime="2025-07-07 12:21:36.696"/> <WorkEffortStatus workEffortId="10002" statusId="PRUN_DOC_PRINTED" statusDatetime="2025-07-07 12:23:06.286"/> <WorkEffortStatus workEffortId="10002" statusId="PRUN_RUNNING" statusDatetime="2025-07-07 12:23:22.869"/> <WorkEffortStatus workEffortId="10002" statusId="PRUN_COMPLETED" statusDatetime="2025-07-07 12:23:24.890"/> <!-- Production Run: Skateboard Final Assembly --> <WorkEffort workEffortId="10003" workEffortTypeId="PROD_ORDER_HEADER" currentStatusId="PRUN_COMPLETED" workEffortPurposeTypeId="WEPT_PRODUCTION_RUN" workEffortName="Skateboard Final Assembly" estimatedStartDate="2025-07-07 12:20:26.200" estimatedCompletionDate="2025-07-07 12:20:26.300" actualStartDate="2025-07-07 12:23:38.039" actualCompletionDate="2025-07-07 12:24:01.323" facilityId="WebStoreWarehouse" quantityToProduce="100" quantityProduced="100" revisionNumber="6"/> <WorkEffortStatus workEffortId="10003" statusId="PRUN_CREATED" statusDatetime="2025-07-07 12:21:36.710"/> <WorkEffortStatus workEffortId="10003" statusId="PRUN_DOC_PRINTED" statusDatetime="2025-07-07 12:23:35.152"/> <WorkEffortStatus workEffortId="10003" statusId="PRUN_RUNNING" statusDatetime="2025-07-07 12:23:38.041"/> <WorkEffortStatus workEffortId="10003" statusId="PRUN_COMPLETED" statusDatetime="2025-07-07 12:23:48.373"/> <WorkEffortGoodStandard workEffortId="10003" productId="STC1005" workEffortGoodStdTypeId="PRUN_PROD_DELIV" fromDate="2025-07-07 12:20:26.2" statusId="WEGS_CREATED" estimatedQuantity="100.0"/> <!-- Task: Final Assembly --> <WorkEffort workEffortId="10004" workEffortTypeId="PROD_ORDER_TASK" currentStatusId="PRUN_COMPLETED" workEffortPurposeTypeId="WEPT_PRODUCTION_RUN" workEffortParentId="10003" workEffortName="Final Assembly" priority="10" estimatedStartDate="2025-07-07 12:20:26.200" estimatedCompletionDate="2025-07-07 12:20:26.300" actualStartDate="2025-07-07 12:23:38.039" actualCompletionDate="2025-07-07 12:23:48.078" quantityToProduce="100" quantityProduced="100"/> <WorkEffortStatus workEffortId="10004" statusId="PRUN_CREATED" statusDatetime="2025-07-07 12:21:36.713"/> <WorkEffortStatus workEffortId="10004" statusId="PRUN_DOC_PRINTED" statusDatetime="2025-07-07 12:23:35.160"/> <WorkEffortStatus workEffortId="10004" statusId="PRUN_RUNNING" statusDatetime="2025-07-07 12:23:38.033"/> <WorkEffortStatus workEffortId="10004" statusId="PRUN_COMPLETED" statusDatetime="2025-07-07 12:23:48.355"/> <WorkEffortGoodStandard workEffortId="10004" productId="STC1001" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:14:02.0" statusId="WEGS_COMPLETED" estimatedQuantity="200.0"/> <WorkEffortGoodStandard workEffortId="10004" productId="STC1002" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:14:21.0" statusId="WEGS_COMPLETED" estimatedQuantity="100.0"/> <WorkEffortGoodStandard workEffortId="10004" productId="STC1003" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:14:45.0" statusId="WEGS_COMPLETED" estimatedQuantity="100.0"/> <WorkEffortGoodStandard workEffortId="10004" productId="STC1004" workEffortGoodStdTypeId="PRUNT_PROD_NEEDED" fromDate="2021-06-01 00:15:08.0" statusId="WEGS_COMPLETED" estimatedQuantity="100.0"/> </entity-engine-xml> |
3.3 Breakdown & Interpretation
- Production Runs (PROD_ORDER_HEADER):
- 10000: Handles Deck Sub-Assembly.
- 10003: Handles Skateboard Final Assembly.
- Tasks (PROD_ORDER_TASK):
- 10001 and 10002: Lamination and Shape Deck tasks for Deck Sub-Assembly.
- 10004: Final Assembly task for Skateboard Final Assembly.
- Execution Tracking:
- Each task and run records estimated and actual timestamps.
- quantityProduced reflects the completion of 100 units in each step.
- All tasks and runs are in PRUN_COMPLETED status.
3.4 Developer Notes
- Routing-Based Generation: Routing tasks in Production runs are typically auto-generated from routings defined in Section 2.
- Task Sequencing: Controlled by the priority attribute within each run.
- Traceability: actualStartDate and actualCompletionDate provide precise execution logs.
- Facility-Level Control: All production runs occur at WebStoreWarehouse.
- Revision Tracking: The revisionNumber tracks updates to the production run configuration, incrementing with each change.
3.5 Entity Field Descriptions
<WorkEffort>
Defines a production run or its tasks.
- workEffortId: Unique ID for the production run or task.
- workEffortTypeId:
- PROD_ORDER_HEADER: Production run header (overall job).
- PROD_ORDER_TASK: Individual task within the run.
- currentStatusId: Current status of the run or task (PRUN_CREATED, PRUN_RUNNING, PRUN_COMPLETED, etc.).
- workEffortPurposeTypeId: Purpose of work (WEPT_PRODUCTION_RUN for production-related efforts).
- workEffortParentId: Links task to its parent production run.
- workEffortName: Name of the run or task.
- priority: Execution order for tasks (used in scheduling).
- estimatedStartDate / estimatedCompletionDate: Planned start and end time.
- actualStartDate / actualCompletionDate: Actual start and completion time.
- facilityId: Location where the run takes place.
- quantityToProduce: Planned quantity to be produced.
- quantityProduced: Actual quantity produced (used in tasks).
- revisionNumber: Version number of the production plan.
<WorkEffortStatus>
Tracks status changes over time.
- workEffortId: Refers to a specific production run or task.
- statusId: Status type (e.g., PRUN_CREATED, PRUN_RUNNING, PRUN_COMPLETED).
- statusDatetime: Timestamp of status change.
<WorkEffortGoodStandard>
Defines the inputs and outputs of a production run or task.
- workEffortId: Associated run or task.
- productId: Product involved (produced or consumed).
- workEffortGoodStdTypeId:
- PRUN_PROD_DELIV: Product delivered (output).
- PRUNT_PROD_NEEDED: Raw material/component needed (input).
- fromDate: Effective start date of the association.
- statusId: Status of the material usage (WEGS_CREATED, WEGS_COMPLETED).
- estimatedQuantity: Quantity required or produced.
3.6 Production Run Statuses
Status ID | Description | When Used |
PRUN_CREATED | Created | Initial state when a production run is generated. |
PRUN_SCHEDULED | Scheduled | Optional step indicating planned execution. |
PRUN_DOC_PRINTED | Confirmed (Doc Printed) | Production documents have been generated/printed. |
PRUN_RUNNING | Running | The production run is in progress. |
PRUN_COMPLETED | Completed | Production tasks are finished, and output is recorded. |
PRUN_CLOSED | Closed | Final review done, no further changes allowed. |
PRUN_CANCELLED | Cancelled | The run was aborted before or during execution. |
4. Issuing Raw Materials to Production Tasks
The WorkEffortInventoryAssign entity links inventory items (inventoryItemId) to production tasks (workEffortId), recording material consumption for accurate inventory tracking and cost calculations.
4.1 Example: Material Assignment for Skateboard Production
<?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml> <!-- Task 10001: Lamination (Deck Sub-Assembly) --> <WorkEffortInventoryAssign workEffortId="10001" inventoryItemId="10004" quantity="100"/> <WorkEffortInventoryAssign workEffortId="10001" inventoryItemId="10007" quantity="100"/> <WorkEffortInventoryAssign workEffortId="10001" inventoryItemId="10005" quantity="100"/> <WorkEffortInventoryAssign workEffortId="10001" inventoryItemId="10006" quantity="100"/> <!-- Task 10004: Final Assembly (Skateboard Final Assembly) --> <WorkEffortInventoryAssign workEffortId="10004" inventoryItemId="10000" quantity="100"/> <WorkEffortInventoryAssign workEffortId="10004" inventoryItemId="10001" quantity="100"/> <WorkEffortInventoryAssign workEffortId="10004" inventoryItemId="10002" quantity="100"/> <WorkEffortInventoryAssign workEffortId="10004" inventoryItemId="10003" quantity="100"/> <WorkEffortInventoryAssign workEffortId="10004" inventoryItemId="10008" quantity="100"/> </entity-engine-xml> |
4.2 Inventory Assignment Summary
Task ID | Task Name | Inventory Item IDs | Quantity Used | Product ID | Component |
10001 | Lamination | 10004, 10005, 10006, 10007 | 100 each | STC2001, STC2002, STC2003, STC2004 | Glue, Face, Ply, Core |
10004 | Final Assembly | 10000, 10001, 10002, 10003, 10008 | 100 each | STC1001, STC1002, STC1003, STC1004, STC1004 | Sticker, Warranty Card, Transfer, Deck, Deck (produced) |
4.3 Developer Notes
- Inventory Availability: Inventory items must exist and be available before assignment.
- Task-Level Assignment: Material assignments are linked to individual tasks (PROD_ORDER_TASK), not the production run header (PROD_ORDER_HEADER).
- Inventory Management: Assigned quantities are consumed based on task execution status.
4.4 Entity Field Descriptions
<WorkEffortInventoryAssign>
Links a specific production task to the inventory items it consumes during execution.
- workEffortId: ID of the production task (PROD_ORDER_TASK) using the inventory.
- inventoryItemId: ID of the inventory item consumed in the task.
- quantity: Quantity of the item assigned for use in the task.
5. Receiving Finished Goods into Inventory
The WorkEffortInventoryProduced entity links a completed production run (workEffortId) to the produced inventory item (inventoryItemId), formally recognizing the addition of finished goods to stock.
5.1 Example: Finished Goods Receipt for Skateboard
This XML data is generated after Step 3.10 of executing the production run in Apache OFBiz.
<?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml> <WorkEffortInventoryProduced workEffortId="10000" inventoryItemId="10008"/> <WorkEffortInventoryProduced workEffortId="10003" inventoryItemId="10009"/> </entity-engine-xml> |
5.2 Key Interpretation
Production Run ID | Run Name | Produced Inventory Item | Quantity (Inferred) |
10003 | Skateboard Final Assembly | 10009 | 100 units |
- inventoryItemId="10009" represents the finished Skateboard, now available in stock for shipping, sale, or reservation.
5.3 Developer Notes
- Automatic Creation: This record is typically auto-created upon production run completion.
- Inventory Setup: The inventory item (10009) must be configured with productId, location, and quantity.
- Traceability: Combined with WorkEffortInventoryAssign, this provides a complete trace from component consumption to task execution to finished goods creation.
5.4 Entity Field Descriptions
<WorkEffortInventoryProduced>
Links a completed production run to the inventory item it has produced.
- workEffortId: ID of the production run (PROD_ORDER_HEADER) that generated the inventory.
- inventoryItemId: ID of the inventory item created as a result of the production run.
6. Conclusion
This guide showcased the demo data required to simulate a complete production process in Apache OFBiz. Rather than walking through each configuration step, it focused on presenting the essential data setup, including product definitions, Bills of Materials (BOM), routings, and routing tasks needed before a production run can begin.
It then demonstrated the execution phase using this demo data: creating a production run, approving it, issuing components to specific tasks, and completing the run to generate finished inventory.
By understanding how this demo data connects across the manufacturing module, both developers and business analysts can gain clarity on the underlying Apache OFBIz data model. This insight not only helps in setting up meaningful demo environments, but also lays the groundwork for customizing and extending the system to match real-world manufacturing workflows.
Whether you're validating a configuration, preparing a demo, or planning a live deployment, this data-centric walkthrough provides a solid foundation for working with the Apache OFBiz Manufacturing module.