Knowledge Model Migration

A knowledge model can be created from scratch or by customizing an existing model. When customizing a model, we call the original the Parent KM and the customized model the Child KM. We can create the Child KM from any published version of the Parent KM, make changes and publish a version of the Child KM. However, the Parent KM can evolve, and at some point we might want to have those changes in our Child KM, too.

That is what the knowledge model migration is for. Once a new version of the parent KM is published, we can start the KM migration where we go through these changes. We can choose whether we want to apply or reject these modifications to our child KM during migration. At the end, we publish a new version of the child KM with all the selected changes.

Parent Knowledge Model changes selectively applied or rejected in a child model

Parent and child Knowledge Model migration.

Creating a Knowledge Model Migration

We can start the knowledge model migration from the list of knowledge model editors. If there is a newer version of the Parent KM available for a particular knowledge model editor, we can see a yellow update available badge next to the name of the editor.

Warning

If there are some unpublished changes in the Child KM, we cannot start the migration (there will be no update available badge). We need to publish the changes first.

Chemistry Knowledge Model editor showing the update available badge and Update menu action

Knowledge Model Editor with a parent update available.

We can either click on the badge directly, or choose the Update option from the dropdown menu. It will open a modal window where we can choose a new version of the Parent KM that we want to migrate our Child KM to. Usually, we want to pick the latest.

Create migration dialog with Common DSW Knowledge Model version 2.8.3 selected

Select the new parent Knowledge Model version.

Knowledge Model Migration

During the migration, we can see all the changes one by one and can choose whether we want to Apply or Reject the change. We can also choose to Apply all to accept all remaining changes.

Knowledge Model migration change review showing Reject, Apply and Apply all controls

Review a change from the parent Knowledge Model.

Cancelling a Knowledge Model Migration

We can cancel the knowledge model migration at any point before we publish the new version of the child KM. We need to navigate to the list of knowledge model editors and choose Cancel migration from the dropdown menu for the desired KM editor.

Finishing a Knowledge Model Migration

After we resolve all the changes, we are ready to publish the new version of the child KM. To do that, we need to click on the Publish button. This will open the Publish new version screen where we need to provide additional information for the new version of the knowledge model.

The publish screen shows us some information about the knowledge model, such as its Knowledge Model Name and Knowledge Model ID. We need to choose the new version number.

Note

We recommend using a similar approach as in semantic versioning. So when we have a version <major>.<minor>.<patch>, change in the major version number indicates some breaking changes (deleting questions, significant changes in the questionnaire structure, etc.), change in minor version number indicates some new changes that are backward compatible (i.e., adding a new question), and change in the patch version number indicates fixes (such as fixing some typos).

The publishing form also contains the following metadata, pre-filled from the editor:

  • License - this is used when we want to share the knowledge model with other people so they know how they can do that. We recommend using a license identifier from SPDX License List.

  • Description - this should be really short and descriptive. It appears, for example, in selection lists when creating a new project to help researchers choose the best knowledge model for their use case.

  • Readme - this is where we can describe everything we need about the knowledge model. We can, for example, include a changelog of what changed in what version, etc. We can use Markdown in this field to provide some nice formatting.