Version management of templates
Last updated
Was this helpful?
Last updated
Was this helpful?
Templates contain the definition of how data is stored within services. In case you modify the template, that modification will have affect on all services based on that template (version).
Services that have been published, will have service versions for each publication. It is important to understand that each service version is linked to a template version. This means that publications of the same service, can be based on different template versions and therefore contain different data.
When a service is published and is therefore linked to a template version, that link will never change. However, if you modify the template version (see tab retired versions within a template), you can make modifications to the template, that will have affect on the service version.
A new version of a template can only be created through the release manager. By importing a template in the release manager, you get the option to convert existing services to the new template, or keep the existing service publications linked to their current template.
This will import the new template and no service will be related to this newly imported template version. It will overwrite if there is an existing template definition, with the same name. The overwritten template will become a retired version of the template.
Again, this option will only have affect if there is a template existing with the same name. If that is the case, this option will convert unpublished services to the newly imported template. All versions of those services remain linked to the original version of the template. This is a good option if you have for example removed fields from the template, or modified the field type of parts. The removed parts will remain available in the old service versions.
This will convert published and unpublished services to the new template definition (in case there are services linked to a template with the same name). Please be aware that if you have removed fields from the template, the data within services and service versions will be removed as well. Only use this option if you're sure that the new version won't delete any data that should be kept.
It is possible to convert a service to a new template. This can only be done through the webservice Services: update service field. Set the field "FieldName" to "template" and the field "Text" to the template guid or template name. Be very careful in using this functionality, as you will loose data in case the new template doesn't have the internalname of a part.
There is a JavaScript function (getConvertToTemplateMessages) available to compare the contents of 2 templates. This will give you insights in what will happen in case you replace a template with another version of that template.