Skip to main content
1-Visitor
June 14, 2020
Solved

Properties are not visible in Composer for Thing shape after creating through REST API

  • June 14, 2020
  • 2 replies
  • 2618 views

Hello,

I am trying to create 48 Numbers of properties for a Thing Template in Thingworx using RestAPI.  While creating each property I receive 200 Ok response.  (Used AddPropertyDefination service)


Error:  some of those properties are not visible in Composer.

However, GetInstanceMetadataAsJSON gives all 48 properties in response.

 

 

Note:   Problem is similar to article: https://www.ptc.com/en/support/article/CS314694

but this is for thing template.

 

Best answer by PaiChung

You probably should not do parallel calls to do AddPropertyDefinition - very likely there is a locking going on as it updates the model so you may be running into that with this approach.

2 replies

22-Sapphire I
June 15, 2020

Since it is a template you obviously can't do the restart. Maybe in composer you can at least try an Edit / Cancel Edit to see if it refreshes with the proper definition. I wouldn't recommend Edit / Save because it may transfer the improper in memory model to the persistence layer.

If you create a Thing from it, do all your properties appear?

Not sure if you are doing a bulk create or not, but potentially our persisted and in memory model are out of synch due to the way the properties are being created.

If none of these steps make a difference then restart Thingworx see if all properties show up. If that is the case then you will probably have to create your properties 'slower'

1-Visitor
June 15, 2020

Or just thinking loud, you can query all implementing Things, and restart them one by one.

1-Visitor
June 18, 2020

Restarting Thing does not seem to work.  
After restarting all implementing Things show the same list of properties as Thing Template.

 

 

 

 

Support
June 30, 2020

Hi @urvilkhatri2908.

 

Have you found a solution for your issue?  If so, please provide those details for the benefit of others with the same issue and mark your post as the Accepted Solution.

 

If you are still searching for a solution, please provide a sample of the content of your REST call so we can validate it's not missing something.

 

Regards.

 

--Sharon