Version control


The version control in primedocs allows to make and test more complex changes in the templates without endangering the productive templates.

In general, a template can have multiple versions, with all versions linked by the unique TemplateId. If a new version of an existing template is created, all data is copied. A version is created manually.


Release mode (Public draft)

To select the correct template version during document generation, a version must be marked accordingly:

  • Published: This template version is the public version, visible to all users.

  • Draft: This template version is used for testing and is only visible to template administrators.

  • Unspecified: This template is not defined as either "Draft" or "Published" (usually an old template version).

"Published" and "Draft" can be set at the same time. "Published" and "Draft" together behave like "Published" alone.


Generation types

For the Document Engine, there are three different ways to open a template:

  • Document: the template is used to create a new document. For example, it is selected directly in the client and a new document is generated.

  • Editor: The template is opened from the template editor in the corresponding editor.

  • Test Document: To test a template, a document is generated from the template editor using "Test Document". Technically, this is exactly the same process as when a document is generated.


Inheritance and subdocuments

Depending on the creation type (Document/Editor/Test Document) and release mode (Published/Draft/Unspecified), the inheritance or sub-document relation is resolved differently.

Creation type

Version of selected template

Resolved version of dependencies

Creation type

Version of selected template

Resolved version of dependencies

Document

Published

Published

Document

Draft

(not possible)

Document

Unspecified

(not possible)

Editor

Published

Published

Editor

Draft

Draft

Editor

Unspecified

Draft

Test Document

Published

Draft

Test Document

Draft

Draft

Test Document

Unspecified

Draft


Usage scenarios

Normal document generation – "Document

If a user generates a document (= creation type "document"), the version of the template marked as "published" is taken. Any dependencies, e.g. layout templates or style templates, are also resolved as "published". The creation type "Document" is only allowed with templates marked "published". If you want to test changes, there is the "Test Document" button.

Change to a currently released template – "Editor" and "Published"

If the template editor edits an already released template version (= "published") all dependencies are also resolved as "published". The option here is recommended only for manageable changes. For larger changes, a new version should always be created.

Change to a style and test the effects

The template editor can create a new version of the style template. This version is automatically marked as "Draft". To test the changes in a content template, the template editor can now create a test document via "Test Document". This resolves the "Draft" style as a dependency.

Adding a new style and using the style in a new layout version

If you want to add a new style to an existing style template and also use the style in a parent layout template, you can create a new version of both the style and the layout template. Both new versions are automatically marked as "Draft". If the "Editor" is now started from the layout template, the modified style, which is also in "Draft" mode, is loaded. When the changes are complete, both versions can be marked as "published" together.

PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland