Skip to end of metadata
Go to start of metadata

Scenario

  1. We have a "Thermometer" template based on our "Thermometer" thing
  2. We wish to add a new property "precision" to the "Thermometer" thing
  3. in this example, A new template version is created  which includes all the latest changes made to "Thermometer" thing

Prerequisites

  1. Our "Thermometer" thing was created in Create, Read, and Write Property scenario
  2. Our "Thermometer" template with version "1" was created in the Create Template scenario
  3. An existing version in a template is not changed when a change is made to the model thing
  4. A new version must be created which includes all of the latest changes made to the thing

Implementation

  1. Add a "precision" property to "Thermometer" thing
  2. Set the revised "Thermometer" thing as the model thing for a new version #2 in the "Thermometer"  template
  3. Release version #2 to make it available to other users

Steps

1. Add a "precision" property to "Thermometer" thing


  1. Open the "Properties" section on the original "Thermometer" thing tab
  2. Click "New" to open "Create Property" dialog
  3. Set name to "precision"
  4. Select "persistent" as the property type
  5. Select "float" as the data type
  6. Click "Save" to save the new property

Whenever changes are made to a thing that a template is based on, all versions listed in the template remain in their original state (are not changed)

A new version must be created which will include all the latest changes to the "Model thing" of a template

2. Create Version "2" in "Thermometer" Template


 

  1. Open the "Versions" section in the "Template: Thermometer" tab,
  2. Click "New" to open "Create Version" dialog
  3. Set version name to "2"
  4. Select "Thermometer" in the drop-down menu as "Model thing"
  5. Click "Save" to add the new version

 

The "Thermometer" template now has a new version (Version 2) which includes the "precision" property created in step 2

To view the details of the model thing used for any version, open the "Versions" section in the "Template: Thermometer" tab, click on the desired version, and then click on the version number (v.2) in the details section

In order to release this new version, click "Release" in the details section of the selected version

If any more changes are made to the "Thermometer" thing, Version 2 will stay the same, and a new version will have to be created

Whenever a new version is created, the new version name has a default numerical value which is incremented by 1 from the previous version

 

 

  • No labels