Coflyr · Common maintenance execution · DB pending
Common production framework
Index: common production section · Event framework · Planning framework
Seven new table models and eight API request models. Existing main maintenance models are reused for aircraft and components. No migration has been generated/applied, and activation remains disabled pending complete project review.
Latest header review. Unified WorkorderMaster uses parent and child rows. The legacy WorkpackageMaster and former WorkorderMaster definitions are Deprecated. The operational details below describe current backend behavior and must be adapted during adoption. Unified header design.
Latest WorkStep review: one WorkStep model carries all fields; the other WorkStep model/table definitions are marked Dropped. The operational details below describe current backend behavior pending adoption. Combined model and retirement review.
Common production framework (7 new table models + 8 C# models)
One execution framework for aircraft and components with the reviewed hierarchy Parent WorkorderMaster → Child WorkorderMaster → WorkStep. Current backend still uses package/order links pending adoption. Backend added; database migration and activation pending complete project review. Framework, performance definitions and operational flow. WorkStep parent/child consolidation and further candidates. Common maintenance defect/damage reporting. Dropped component execution tables.
| Model class | Table | Fields | Review |
|---|---|---|---|
| ProductionExecution | Production.ProductionExecutions | 13 | Under development · DB pending |
| ProductionExecutionTask | Production.ProductionExecutionTasks | 10 | Under development · DB pending |
| ProductionHold | Production.ProductionHolds | 13 | Under development · DB pending |
| ProductionResourceUsage | Production.ProductionResourceUsages | 12 | Under development · DB pending |
| ProductionQualityGate | Production.ProductionQualityGates | 7 | Under development · DB pending |
| ProductionReleaseRecord | Production.ProductionReleaseRecords | 9 | Under development · DB pending |
| ProductionPerformanceSnapshot | Production.ProductionPerformanceSnapshots | 22 | Under development · DB pending |
| OpenProductionExecutionRequest | C# model | 4 | Under development · DB pending |
| TransitionProductionExecutionRequest | C# model | 3 | Under development · DB pending |
| AddProductionHoldRequest | C# model | 5 | Under development · DB pending |
| ClearProductionHoldRequest | C# model | 2 | Under development · DB pending |
| RecordProductionResourceUsageRequest | C# model | 8 | Under development · DB pending |
| AddProductionQualityGateRequest | C# model | 4 | Under development · DB pending |
| AcceptProductionExecutionRequest | C# model | 4 | Under development · DB pending |
| CaptureProductionPerformanceRequest | C# model | 1 | Under development · DB pending |
Existing shared maintenance and production models reused
| Model class | Purpose in this framework |
|---|---|
| WorkorderMaster | Renamed WorkorderMaster in the review: one header model/table with parent rows replacing packages and child rows holding executable work. Backend/database consolidation pending. |
| WorkpackageMaster | Deprecated in the review; replaced by parent WorkorderMaster rows. Current backend mapping remains until adoption. |
| WorkorderMaster (legacy) | Deprecated in the review; replaced by child WorkorderMaster rows in the unified model. Current backend mapping remains until adoption. |
| WorkStep | One reviewed WorkStep model with 105 combined fields covering execution, repository/revisions, entries, occurrences, resources, material demand, definitions, phases and references. Other WorkStep definitions are Dropped; backend/database completion remains pending review. |
| StaffTimeBooking | Actual staff labor, live bookings, productivity and corrections. Partial merge candidate for step-bound bookings; general bookings remain shared. |
| DefectDamageReport | Common defect/damage occurrence reporting, including direct maintenance origin through WorkStepId. Separate legacy finding/damage workflow retirement remains pending lifecycle reconciliation. |
| ProductionPlan | Common package schedule and versions. |
| ProductionPlanElement | Order/step scheduling, baseline manpower and dependencies. |
How the frameworks fit together
Event and its requirements → shared maintenance demand/planning → Parent WorkorderMaster → Child WorkorderMaster → WorkStep → production execution → operational acceptance and performance. ProductionPlan schedules work; ProductionExecution manages a run. ProductionExecutionTask freezes membership and released-plan manpower estimates without duplicating step state. WorkStep now stores executable steps and their occurrence, action, resource-request and resource-assignment records together.
Operational flow
- Open a run for an accessible aircraft/component workpackage. Select a released Production plan if available. Existing main workorders and steps form the frozen scope; direct legacy package-owned component steps require reconciliation through main workorders.
- Move Draft → Ready → Active. The package records handover and first actual start. New corrective work can be appended using refresh-scope; existing baseline rows are immutable.
- Perform work through the existing workstep/entry operations. Signed actions, independent/double inspections, measurement criteria, document requirements and component results retain their existing controls.
- Book staff labor in StaffTimeBooking. Record actual tool/facility/aircraft usage in ProductionResourceUsage, optionally linking an existing assignment. Overlapping tool/aircraft use is rejected; facilities may be shared.
- Raise package or task holds. Package-wide holds pause the run; clearing all package holds resumes it. Task holds remain local. Holds may refer to a common event.
- Configure active Event-scope Requirements on the source:ProductionExecution event definition. Each run creates an event with frozen obligations. Link obligations to a ProductionQualityGate for task/package context; evidence, satisfaction, waiver and non-applicability use the shared event framework.
- Accept production after all current package orders are closed/cancelled, all steps are completed/formally disposed, relevant findings are closed, holds are cleared and live bookings are finished/cancelled. The common event checks its mandatory requirements and prerequisites in the same transaction.
- Capture immutable performance snapshots during or after work. Operational acceptance records package actual end and a final snapshot. It does not set ReleasedToService/IsCrsReleased; certified release continues through the existing authorized CRS/EASA Form 1 processes.
Performance definitions
- Progress = (Completed + NotPerformed) / (Total − Cancelled − Removed). Empty executable scope is zero, not an automatic completion.
- Planned manpower comes from exact released plan elements. Unknown baselines remain null; efficiency remains null when baselines are incomplete.
- Actual labor uses finalized Staff-kind bookings within the run start/cutoff. Cancelled bookings, corrected originals, tool bookings and live bookings are excluded. Staff/bookings are not duplicated into a new labor ledger.
- Labor efficiency = planned hours earned by Completed steps / finalized actual labor hours. NotPerformed work earns no completed-work hours.
- Package downtime is the union of package-wide hold intervals, so simultaneous material/tool holds are not counted twice. Task holds have separate records.
- Snapshots report unresolved relevant findings, open holds and every pending mandatory obligation of the production occurrence.
API entry points
/api/production-execution supports open/list; /{id} returns tasks, holds, actual resource use, quality context, acceptance and snapshots. Controlled POST operations: transition, refresh-scope, holds, holds/{holdId}/clear, resource-usage, quality-gates, accept and performance. Updates send ExpectedVersion. Concurrency, scope/asset mismatch and out-of-run task references are rejected.
Migration and adoption
After the complete project review, migrate the event/production schema, reconcile legacy component work ownership and backfill the required source/audit identities. Provision controller.productionexecution.read/created/updated/released and event framework permissions. Set EventFramework:Enabled=true and ProductionFramework:Enabled=true (environment variables use double underscores). Production activation requires event activation.
Frontend adoption, legacy table retirement, historical booking allocation across imported runs, full facility capacity optimization and external message delivery remain pending. Existing execution, findings, resource and certified release tables are reused; this change does not approve dropping any additional legacy table.