Wiki·domain·domain/shop-work-order-flow.md

Shop Work Order Flow

A Shop Work Order (SWO) is the ERP's word for a component-level repair order. The aircraft side (AMEPackage) is about keeping the airframe flying; the shop side is about fixing the components that came off it.

Scale: there are 25,192 shop work orders in this dataset and 82 SWO_* tables supporting them. Shop ops is the single biggest domain in the Ramco Aviation data model — easily half of everything.

What an SWO covers

A component is removed from an aircraft (maybe scheduled, maybe because it failed). It enters a repair shop. Over the next hours to weeks the shop will:

  1. Receive the component from line maintenance or stores
  2. Inspect / fault-find
  3. Disassemble
  4. Repair, replace sub-parts, overhaul
  5. Reassemble
  6. Functional test / calibration
  7. Certify airworthy
  8. Return to stores or directly onto another aircraft

Every one of those steps is a row in the SWO tables.

The header: swo_swoh_shop_wo_hdr

The SWO header is the spine. Key columns:

  • swoh_swo_no — the SWO number (e.g. AWO-000121-2022)
  • swoh_swo_type — type of order. AWO (Annual Work Order), CWO (Component Work Order), CSO (Customer Service Order)
  • swoh_status — operational status
  • swoh_partno, swoh_part_serialno, swoh_part_desc — the component being worked on
  • swoh_primary_wc_code — the primary work centre
  • swoh_rem_aircraft_reg_nothe aircraft this component was removed from (our link back to Aircraft)
  • swoh_rem_part, swoh_rem_serial_no, swoh_rem_date — removal details
  • swoh_cust_no — which customer owns the work (for third-party MROs)
  • swoh_cust_warr_req_flag — is this under warranty

For hero aircraft 1132: 301 shop work orders have swoh_rem_aircraft_reg_no = '1132'.

SWO tasks and the three levels of work

Work inside an SWO is organised three levels deep:

  1. Task level — tracked by task_track_id. Lives across multiple tables keyed on it.
  2. Sub-task levelswo_swostk_sub_task_details. One task_track_id can have many sub-tasks.
  3. Separated tasksswo_separated_tsk_maint_lvl_dtl. Occasionally a sub-task gets promoted to its own sub-work-order.

The cardinality: in this dataset, the 301 hero-linked SWOs have ~1,070 task-level rows and associated sub-tasks that cascade further.

Parts consumed in the shop

This is the heaviest table in the dataset — swo_swoprt_part_details is 3.87M rows (1 GB) across all SWOs. For each SWO task, every part that was:

  • Required (swoprt_req_qty)
  • Issued from stores (swoprt_iss_qty)
  • Consumed in the work (swoprt_used_qty)
  • Returned afterwards (swoprt_ret_qty)

…lives here. This is the ERP's shop-side equivalent of material reconciliation.

For the hero aircraft's 301 linked SWOs, we have ~64K part-detail rows in this table.

Routing and core management

Two specialised tables track the physical movement of components:

  • swo_swortng_routing_dtlRouting. Where does the part go next? The routing table captures every hop the component makes between work centres, repair agencies, warehouses, and back.
  • swo_swoassoc_main_core_dtlCore association. The "core" is the main component the SWO is repairing. If that core gets split or a BER (Beyond Economic Repair) decision is made, it's recorded here.

Related: swo_swocds_core_disassm_assemble_det tracks disassembly and reassembly of a core through the shop.

Labour and time tracking

Used for cost roll-up into swo_swocst_cost_summary.

Certificates — the shop's regulatory output

An SWO doesn't formally close until the shop produces the required paperwork:

Regulatory rule: a repaired component cannot be installed back on an aircraft without an airworthiness release tag (FAA 8130-3, EASA Form 1, etc.). The certificate tables feed that tag-generation workflow.

Billing

If the SWO is under a customer contract, the charge lines are in swo_swocrg_charge_details and historised in swo_swocrgh_charge_details_his. The warranty flags on the header (swoh_cust_warr_req_flag, swoh_cust_warr_res_flag) drive billable-vs-non-billable.

Kits — bundled parts

Complex repairs often draw from pre-packaged kits (e.g. "landing-gear overhaul kit", "engine HP-seal replacement kit"). These are in:

The SWO lifecycle in status codes

Common swoh_status values:

  • PL — Planned (scoped but not yet started)
  • PN — Pending (work begun, something blocking)
  • EX — Executing
  • CL — Closed
  • RV — Revised (baseline changed)
  • CA — Cancelled

Transitions between these are governed by the rules at Work Unit Completion Rules.

Tracing an SWO end-to-end

Given swoh_swo_no = 'AWO-000121-2022':

  1. Header: swo_swoh_shop_wo_hdr (one row)
  2. Additional hdr: swo_swoah_shop_wo_addl_hdr
  3. Tasks: swo_swostk_sub_task_details WHERE swostk_swo_no = X
  4. Task additional detail: swo_swotad_shop_wo_tsk_addl_dtl joined via task_track_id
  5. Parts consumed: swo_swoprt_part_details joined via task_track_id
  6. Resources/labour: swo_sworc_res_consump_dtl, swo_swoema_emp_actuals_dtl
  7. Routing hops: swo_swortng_routing_dtl WHERE swortng_genrtd_swo = X
  8. Core chain: swo_swoassoc_main_core_dtl + swo_swocds_core_disassm_assemble_det
  9. Certificates: swo_swococ_conformity_cert_list + swo_swoccm_com_certificate_dtl
  10. Cost summary: swo_swocst_cost_summary

The knowledge graph does this walk in one traversal — see Step 3.

See also