- Documentation
- /
- Scrm
- /
- 01 — Quick Reference
01 — Quick Reference
Menu map
| Group | Models |
|---|---|
| Reference Data | SiteRef |
| Campaign & Scope | Campaign · ScopeItem · ScopeChange |
| Packages & Readiness | CampaignWorkPackage · Dependency · ReadinessRequirement |
| Mobilisation & Milestones | ContractorMobilisation · CampaignMilestone · ReadinessSnapshot |
| Integration | ExternalRecordLink |
Every model (12) — one line each
| Model | It records | Key foreign keys |
|---|---|---|
| SiteRef | A site / facility | — |
| Campaign | The shutdown / outage / turnaround being run | SiteRef |
| ScopeItem | Work brought into the campaign | Campaign |
| CampaignWorkPackage | An executable package delivering a scope item | Campaign, ScopeItem |
| Dependency | A constraint between two work packages | Campaign, CampaignWorkPackage (predecessor + successor) |
| ReadinessRequirement | One prerequisite for a work package | CampaignWorkPackage |
| ContractorMobilisation | A contractor being mobilised | Campaign |
| CampaignMilestone | A schedule checkpoint | Campaign |
| ReadinessSnapshot | A point-in-time readiness roll-up | Campaign |
| ScopeChange | A requested change to scope | Campaign, ScopeItem |
| ExternalRecordLink | A link to an authoritative record in another system | — (string refs) |
Status vocabularies
- Campaign status: CONCEPT → DEVELOPING → FROZEN → READY → STARTED → EXECUTING → COMMISSIONING → COMPLETE → CLOSED · plus CANCELLED
- Campaign type: SHUTDOWN · OUTAGE · TURNAROUND · CAMPAIGN · PROJECT_WINDOW
- Scope priority: MUST_DO · SHOULD_DO · OPPORTUNITY
- Scope status: PROPOSED · APPROVED · FROZEN · DEFERRED · REMOVED · COMPLETE
- Package readiness state: NOT_ASSESSED · NOT_READY · PARTIAL · READY · BLOCKED
- Package execution status: PLANNED · RELEASED · STARTED · COMPLETE · VERIFIED · CLOSED
- Requirement type: WORK_SCOPE · MATERIAL · LABOUR · CONTRACTOR · TOOL · ACCESS · PERMIT · ISOLATION · DOCUMENT · ENGINEERING · LOGISTICS · OTHER
- Requirement status: REQUIRED · IN_PROGRESS · READY · NOT_READY · WAIVED
- Dependency type: FINISH_START · START_START · FINISH_FINISH · RESOURCE · ACCESS · MATERIAL · OTHER
- Mobilisation readiness: PLANNED · PARTIAL · READY · AT_RISK · NOT_READY
- Milestone type: SCOPE_FREEZE · MATERIAL_FREEZE · MOBILISATION · SHUTDOWN_START · MECHANICAL_COMPLETE · COMMISSIONING_START · RETURN_TO_SERVICE · CLOSEOUT
- Snapshot overall state: NOT_READY · AT_RISK · READY
- Scope-change decision: PENDING · APPROVED · REJECTED · DEFERRED
Demo data set (29 rows)
| Model | Rows | Model | Rows | |
|---|---|---|---|---|
| SiteRef | 3 | ReadinessRequirement | 5 | |
| Campaign | 2 | ContractorMobilisation | 2 | |
| ScopeItem | 5 | CampaignMilestone | 4 | |
| CampaignWorkPackage | 4 | ReadinessSnapshot | 1 | |
| Dependency | 2 | ScopeChange | 1 |
(ExternalRecordLink is unseeded.)
Cross-app canonical_ref conventions
SCRM links to sibling apps by string canonical_ref, never by database key. Shared
identifiers seen in the seed data:
| Prefix | Example | Owned by | Where SCRM uses it |
|---|---|---|---|
site: |
site:demo-01 |
(local) | SiteRef.canonical_ref |
campaign: |
campaign:sd-2027-01 |
scrm | Campaign.canonical_ref |
workpkg: |
workpkg:wp-1001 |
mwem (work execution) | ScopeItem.source_canonical_ref, CampaignWorkPackage.external_work_package_canonical_ref |
material: |
material:brg-6208 |
msam (materials) / psam (procurement) | ReadinessRequirement.external_canonical_ref |
supplier: |
supplier:site-services |
psam (procurement) | ContractorMobilisation.supplier_canonical_ref, ReadinessRequirement.external_canonical_ref |
permit: |
permit:pmt-1001 |
(permit/isolation) | ReadinessRequirement.external_canonical_ref |
Local Int ids are database keys only; canonical_ref values are stable and must never be reused.
Local run
python server/run.py scrm # http://localhost:5085
(Re)seed sample data
python -m codegen.cli seed scrm # load if empty
python -m codegen.cli seed scrm --reset # wipe and reload
Regenerate code & diagram
python -m codegen.cli all scrm # models, controllers, menu, configs
python scripts/build_diagram_viewer.py scrm # rebuild the interactive diagram viewer