Skip to main content
1-Visitor
October 7, 2020
Question

Extension Dependency Query

  • October 7, 2020
  • 1 reply
  • 1439 views

Hi,

 

I wanted to clarify, I am building an extension which should be dependent on another extension. Therefore when I try to import my extension 'B' into the ThingWorx instance it should not be imported as there is a dependency on my extension 'A', i.e. -  extension 'A' should be present in my ThingWorx instance for extension 'B' to be imported :

  1. This can be achieved by assigning the 'dependsOn' attribute to "ExtensionA:version" (ExtensionA:1.0.0) in the metadata.xml of my extension 'B', right?
  2. Please let me know what shall I do, so that the dependency is checked only for the extension and not the correct version number. In our previous example my extension 'B' should be imported once extension 'A' is present in the instance. There is no requirement which version is present. Can this be achieved?

 

Thanks in advance

1 reply

5-Regular Member
October 8, 2020


Hello @SrijithKrish ,

 

Taking into consideration the requirements that you have and the specifics for building an extension, it is recomended to work with one of our Professional Services consultants on the design.  Please contact your Sales rep or reach out to the Sales team for arranging an engagement.

1-Visitor
October 8, 2020

Thank You @Ciprian-Traian 

 

Actually I had tried in the trial instance that I have by assigning the 'dependsOn' attribute of the metadata xml of my extension and it kinda worked. If I have not provided the version specifically it is just checking for the extension in the dependsOn.

What I had done is it proper? Will it be causing any other issues within my extension after import? I suppose no because I could not find anything specifically. Please let me know if what I did is correct?

5-Regular Member
October 15, 2020

Hello @SrijithKrish,

 

You can specify the dependency as just the package name, e.g.  dependsOn="ExtensionA"  with no version specified.  You will see a warning in the log after importing the new extension something like this:
Extension dependency: ExtensionA does not use versioning. All versions should use the format "name:major.minor.patch", where major, minor, and patch are integers.
This is only a warning and does not prevent the extension installation.

 

Can you also clarify some points around the issue ?

Why do you wish to circumvent the ext version check?

Which ThingWorx version are you using and do you have single server or HA cluster?