Skip to main content
1-Visitor
August 4, 2016
Question

How can we modify the Base Template Of another Template or Thing in Thingworx Composer?

  • August 4, 2016
  • 2 replies
  • 5949 views

Is there any way in composer where we can add new Template into the hierarchy of Templates which is already created?

This topic has been closed for replies.

2 replies

1-Visitor
August 4, 2016

Hi Veena,

Not with the composer, but I did it before and it works:

  • Export the entity as XML ( Entity > More > Export )
  • Dupblicate the XML file ( just in case... )
  • Edit the XML file with a text editor
    • Search for <ThingTemplate baseThingTemplate="originalBaseTemplate"
    • change "originalBaseTemplate" with the desired base template
  • Import the new XML ( Import/Export > From File > Entities > Single File )

E voilà

This is not official, I've tested and worked without restarting Tomcat.

Best Regards,

Carles.

1-Visitor
September 14, 2017

The workaround you suggested work and points out a possible bug , as the intent is not to change the base template for the design . Thingworx should work to fail to through validation if xml is edited manually . Just like java bytecodes if changed manually , compiler fails it.

1-Visitor
September 14, 2017

Hi Ravi,

I don't think "java laws" applies here, we are working with a live not compiled system ( scripting like ) which runs forever and restarts should be avoided as much as we can. Better to not to validate XML export/import, just validate if the structure and data it's ok, but not this kind of integrity you are pointing out.

Just my two cents and my point of view.

Best Regards,

Carles.

20-Turquoise
August 15, 2016

Hi Veena,

It wouldn't be possible through the Composer, however, what Carles described above should work (i.e,. manually editing exported xml file and then re-importing it back into the system - be careful with keeping the syntax, of course).