Validation & Business Rules
Detailed architecture of validation and business rule enforcement in the Engine.
The Engine provides four core functional areas that work together to manage the complete lifecycle of package revisions:
Enforces package lifecycle state machine and business rules through:
For detailed architecture and process flows, see Lifecycle Management.
Validates operations and enforces business rules to ensure correctness through:
For detailed architecture and process flows, see Validation & Business Rules.
Orchestrates the draft-commit pattern for all package revision modifications through:
For detailed architecture and process flows, see Draft-Commit Workflow Orchestration.
Coordinates task execution by delegating to the Task Handler through:
For detailed architecture and process flows, see Task Coordination.
┌─────────────────────────────────────────────────────────┐
│ Engine │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Validation & │ │ Lifecycle │ │
│ │ Business Rules │ ───> │ Management │ │
│ │ │ │ │ │
│ │ • Lifecycle │ │ • Transitions │ │
│ │ • Tasks │ │ • Constraints │ │
│ │ • Workspace │ │ • Enforcement │ │
│ │ • Clone/Upgrade │ │ │ │
│ │ • Path Overlap │ │ │ │
│ │ • Opt. Locking │ │ │ │
│ └──────────────────┘ └──────────────────┘ │
│ │ │ │
│ └────────┬────────────────┘ │
│ ↓ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Draft-Commit │ │ Task │ │
│ │ Orchestration │ ───> │ Coordination │ │
│ │ │ │ │ │
│ │ • Open Draft │ │ • ApplyTask │ │
│ │ • Apply Changes │ │ • DoPRMutations │ │
│ │ • Close Draft │ │ • DoPRResource │ │
│ │ • Rollback │ │ Mutations │ │
│ └──────────────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────────┘
Integration flow:
Each functional area is documented in detail on its own page with architecture diagrams, process flows, and implementation specifics.
The Engine does not implement package/package revision CRUD operations - it delegates to repository adapters:
Delegation operations:
repo.ListPackageRevisionsrepo.ListPackagesrepo.CreatePackagerepo.DeletePackagerepo.DeletePackageRevisionThese are thin wrappers that open the repository through the cache and delegate to repository adapters. The actual storage operations (Git commits, tags, branches) are handled by repository adapters, not the Engine.
The Engine’s real work is orchestration, validation, lifecycle enforcement, and task coordination - not storage operations.
Detailed architecture of validation and business rule enforcement in the Engine.
Detailed architecture of the draft-commit workflow pattern and rollback mechanisms.
Detailed architecture of package revision lifecycle state machine and enforcement.
Detailed architecture of task handler integration and coordination.