# Routing and Work Center Definition

## Overview

Routing and Work Center Definition captures how manufacturing work is performed and where capacity exists to perform it. A `Routing` defines the ordered set of operations required to produce an item, including sequence, standard setup or run times, instructions, and the work center expected to execute each step. A `WorkCenter` represents the machine, line, cell, or labor pool where operations are scheduled and reported.

This feature establishes the execution structure used by production orders and work orders. Routing and work-center data drive planned lead time, operation sequencing, standard labor or machine cost, optional overhead absorption policy, and the work-order breakdown created when a production order is released. The initial scope supports deterministic step sequencing and capacity context, while deferring advanced optimization, parallel routing logic, and outsourced operations.

## Business Purpose

- Define a repeatable manufacturing process for each produced item or family of items
- Associate each operation with the capacity and cost context required for planning and execution
- Support realistic planned duration and standard-cost estimation before work begins
- Provide operators and supervisors with step-level instructions and expected execution order
- Create the basis for work-order generation and progress tracking at operation level
- Prevent production from being released against incomplete or inactive process definitions

## Process Flow

```mermaid
flowchart TD
    A[Create WorkCenter] --> B[Set company or site scope, calendar, capacity, and rates]
    B --> C[Activate WorkCenter]
    C --> D[Create Routing]
    D --> E[Add ordered operations with standard times and instructions]
    E --> F[Assign each operation to a WorkCenter]
    F --> G{Valid sequence and active centers?}
    G -->|No| H[Correct routing or work-center data]
    H --> E
    G -->|Yes| I[Activate Routing]
    I --> J[Production order selects routing]
    J --> K[Release creates work orders by operation]
```

## Scenario Patterns

- **Single-line assembly flow**: A finished item uses a simple routing with cut, assemble, inspect, and pack operations assigned to distinct work centers
- **Shared bottleneck center**: Several routings reference the same constrained work center, allowing planners to see where capacity pressure will accumulate
- **Site-specific process**: The same manufactured item uses different routings at different sites because local equipment or labor specialization differs
- **Instruction-driven operation**: An operation stores setup notes, drawings, or SOP-style instructions so execution users know the expected method
- **Standard-time planning**: Standard setup and run time on routing operations provide the planned duration used for release and variance comparison
- **Resource-based overhead policy**: A work center defines the overhead absorption method and rate used by manufacturing cost snapshots for orders executed on that resource
- **Controlled process revision**: A routing is revised for future orders while open production orders continue using the snapshotted process they were released with

## Test Cases

- Creating a work center with a unique code within its company or site scope should succeed
- A work center must require positive capacity assumptions and must not be activated while missing required calendar or status data
- Creating a routing with at least one operation assigned to an ACTIVE work center should succeed
- Routing operation sequence numbers must be unique within the routing
- An ACTIVE routing must reject references to inactive or cross-company work centers
- Standard setup and run times on an operation must be zero or greater
- A work center may define one overhead absorption method and rate, which released production orders snapshot for later cost comparison
- Releasing a production order should snapshot the selected routing and operation definitions onto generated work orders
- Editing a routing after a production order is released must not mutate the released order's operation plan
- Deactivating a work center that is referenced by future routings or open released work should be blocked or require controlled replacement
- Only authorized manufacturing users should be able to activate, revise, or deactivate work centers and routings

## Reference Links

- [Odoo work centers and operations](https://www.odoo.com/documentation/19.0/applications/inventory_and_mrp/manufacturing/advanced_configuration/using_work_centers.html)
- [Oracle Manufacturing work definitions](https://docs.oracle.com/en/cloud/saas/supply-chain-and-manufacturing/25c/faumf/how-you-create-work-definitions.html)
- [SAP Digital Manufacturing routing documentation](https://help.sap.com/docs/sap-digital-manufacturing/execution/routing)
