Overview
Flow: Asset Registration -> Compliance Rules Applied -> Schedules Created -> Jobs Generated -> Compliance Verified
apps/workbooks-api/src/trpc/routers/compliance-workflow.tsapps/workbooks-api/src/trpc/routers/maintenance-workflow.tspackages/workbooks-db/src/schema/workbooks/compliance.ts
Status States
Asset Status
Compliance Schedule Status
Workflow Diagram
Compliance Workflow Steps
1
Asset Registration
Asset is created with type, location, and customer details. Asset type triggers rule matching.
2
Rules Applied
Compliance rules are matched based on asset type and jurisdiction.
Regulatory Rules
- State laws
- National standards
- Industry codes
Manufacturer
- Service manual
- Warranty terms
- Best practices
Custom Rules
- Company policy
- Customer requirements
- Contract terms
3
Schedule Generation
Schedules are created for each applicable rule with due dates and notification dates.
4
Job Creation
When lead time is reached, jobs are auto-created with pre-filled inspection tasks.
5
Inspection & Verification
Technician completes inspection. Results determine next steps:
Compliance Rule Structure
Rule Definition
Australian Standards Example
Overdue Calculation
Risk Matrix
Asset Status Transitions
API Endpoints
Compliance Management
Maintenance Workflow
Notification Schedule
Testing
Compliance Test Path
1
Create Asset
Create asset with type “fire-extinguisher”
2
Apply Rule
Apply AS 1851 monthly rule
3
Verify Schedule
Verify schedule created with correct due date
4
Trigger Lead Time
Fast-forward to lead time
5
Check Job
Verify job auto-created
6
Complete Job
Complete job with “pass” result
7
Verify Next Schedule
Verify next schedule generated
8
Check Compliance Rate
Check compliance rate updated
Integration Tests
Related Documentation
Fault Resolution
When inspections fail
Job Scheduler
Auto-generated jobs
Status Reference
All status enums
Regulations
Australian compliance standards