What this is about
Some templates belong to a build. They live in an application’s source code, are reviewed and tested with it, and should simply be there after the start. CRMS has no special path for this: no template folder it reads by itself, and no template that bypasses the chain.
The flow
-
1Application→CRMSacts as a platform administrator: a fixed id as author, the administrator roles from CIAS, no tenant
-
2Application→CRMScreates the system edition if it does not exist yet, and the variant for each language
-
3Application→CRMSreads the published revision of the variant
-
4ApplicationIs its source the same as the one from the build?
-
5Applicationthe same → do nothing, no new revision
-
6Application→CRMSdifferent, or nothing published yet → save the draft and submit it with a reason
-
7CRMSthe approval chain of the scope
SYSTEMdecides, as for every templateResult: without stagesPUBLISHEDat once, otherwiseIN_REVIEW
Because the application only submits when there is a difference, a start with an unchanged build changes nothing in the chain. A changed template in a new build becomes exactly one new revision.
When: the template does not exist yet
Edition and variants are created, and every variant gets its first revision.
Result: revision 1 per language, PUBLISHED without approval stages
When: the source in the build equals the published revision
The application submits nothing.
Result: no new entries
When: a new build brings a different source
Only the changed variant gets a new revision. The others stay as they are.
Result: new revision, the previous one becomes SUPERSEDED
When: the project has an approval chain for SYSTEM
The submitted revision waits in IN_REVIEW until people approve it. Until then the previous revision renders. As long as a revision is in review, another submit ends with 409 template-review-pending.
Result: approval as for every system template
The example: the hub’s reports
The hub renders its project documents with an embedded CRMS: the arc42 architecture documentation, the data classification and the operations runbook. The templates are part of the build under crms-templates/.
| Report | Key DOCUMENT (PDF, HTML) | Key WORD (DOCX) | Languages |
|---|---|---|---|
| arc42 | arc42 | arc42-word | de (default), en |
| Data classification | privacy | privacy-word | de (default), en |
| Operations runbook | runbook | runbook-word | de (default), en |
Every report is two keys, because the output type decides the formats. The files are called <key>/<language>.xhtml.ftl for DOCUMENT and <key>-word/<language>.xml.ftl for WORD.
The chain names hub-backend as author and “Template shipped with the hub-backend build” as reason. The hub defines no approval stages for SYSTEM. So its templates are published right after they are submitted. How the hub then renders them is described in Example: the hub’s reports.