Skip to main content
1-Visitor
April 21, 2016
Question

ThingWorx extension versioning requirements?

  • April 21, 2016
  • 2 replies
  • 5278 views

After making some modification to restructure an extension, I tried to update the server and got the following ...

What can and cannot be changed between versions of an extension? Are the rules documented somewhere?

I checked the Thingworx extension development user guide (TWX 6.6) but there are no details there.

2 replies

5-Regular Member
April 22, 2016

When you upgrade an extension package from one major version to the next major version, you can get that error. To resolve this issue, try these steps below to remove the extension package and reimport.

  1. Export all entities that depend upon the extension in question
  2. Delete all entities that depend upon the extension in question
  3. Remove the extension through the Manage extensions screen under the Import/Export menu option
  4. Import the new extension through the Import/Export menu option Import



asinclair1-VisitorAuthor
1-Visitor
April 22, 2016

Thanks for providing a workaround, Daniel.


In a production system, however, this procedure would cause an interruption of service, requires coordination between tenants, and incorporates some risk of losing data.

I need an answer to my original question so I can plan enhancements to my Extensions that avoid the need to restart.

1-Visitor
April 22, 2016

Andy,

Starting with ThingWorx 6.6, extensions follow a Semantic Versioning 2.0.0 like set of rules for the packageVersion number of an extension. Basically, extension versions must follow the <major>.<minor>.<patch> format where each section is a numeric value.

  • When the current extension is already installed(For example: MyExtension with a version of 2.5.3)
    • Major version differences are not allowed into the system. Major changes signify a change in an extension that is not backwards compatible. MyExtension:3.0.1 would not be allowed to be installed.
    • Minor version differences are allowed into the system only when the minor version is greater than the minor version that is installed. MyExtension:2.6.1 would be allowed to be installed.
    • Patch version differences are also allowed into the system only when the patch version is greater than the patch version that is installed. MyExtension:2.5.4 would be allowed to be installed.

Whether you are on a production system or not, it's likely you'll need a restart of ThingWorx to get your new extension's JAR file(s) to replace the existing one(s). What you'll need to do is a "dump and pump" which is a full export and import of your current system into a new system with your new extension installed. If you incorporated a change to your extension that causes your existing entities and data to be incompatible, it's a bit more involved because you now have to transform your export before you import.

asinclair1-VisitorAuthor
1-Visitor
April 22, 2016

This is the kind of info I needed. Thank you, Brian.

In my case, the old extension was version 1.0.2 and the new one was 1.1.0, which should have been okay according to the rules above. Are the other conditions associated with this error that would be checked during validation?

I need to better understanding of what changes can cause "your existing entities and data to be incompatible." Some thing are obvious, but I suspect the devil is in the details. This is a "best practices" topic and it would be interesting to hear how people manage this.

Thanks again.

1-Visitor
April 22, 2016

You're welcome.

I will look into that error too - it should have been allowed to be installed. We just released ThingWorx 7.1 so maybe there has been some changes/bug fixes around versioning.

Feel free to start another thread about managing extensions from a customer point of view. See what others are doing and maybe that could turn into an organic place for others to submit ideas and share.