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 classTableFieldsReview
ProductionExecutionProduction.ProductionExecutions13Under development · DB pending
ProductionExecutionTaskProduction.ProductionExecutionTasks10Under development · DB pending
ProductionHoldProduction.ProductionHolds13Under development · DB pending
ProductionResourceUsageProduction.ProductionResourceUsages12Under development · DB pending
ProductionQualityGateProduction.ProductionQualityGates7Under development · DB pending
ProductionReleaseRecordProduction.ProductionReleaseRecords9Under development · DB pending
ProductionPerformanceSnapshotProduction.ProductionPerformanceSnapshots22Under development · DB pending
OpenProductionExecutionRequestC# model4Under development · DB pending
TransitionProductionExecutionRequestC# model3Under development · DB pending
AddProductionHoldRequestC# model5Under development · DB pending
ClearProductionHoldRequestC# model2Under development · DB pending
RecordProductionResourceUsageRequestC# model8Under development · DB pending
AddProductionQualityGateRequestC# model4Under development · DB pending
AcceptProductionExecutionRequestC# model4Under development · DB pending
CaptureProductionPerformanceRequestC# model1Under development · DB pending

Existing shared maintenance and production models reused

Model classPurpose in this framework
WorkorderMasterRenamed WorkorderMaster in the review: one header model/table with parent rows replacing packages and child rows holding executable work. Backend/database consolidation pending.
WorkpackageMasterDeprecated 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.
WorkStepOne 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.
StaffTimeBookingActual staff labor, live bookings, productivity and corrections. Partial merge candidate for step-bound bookings; general bookings remain shared.
DefectDamageReportCommon defect/damage occurrence reporting, including direct maintenance origin through WorkStepId. Separate legacy finding/damage workflow retirement remains pending lifecycle reconciliation.
ProductionPlanCommon package schedule and versions.
ProductionPlanElementOrder/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

  1. 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.
  2. 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.
  3. Perform work through the existing workstep/entry operations. Signed actions, independent/double inspections, measurement criteria, document requirements and component results retain their existing controls.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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

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.