cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Unable to get ThingShapes to show Properties and Services on Import

amiller1
1-Visitor

Unable to get ThingShapes to show Properties and Services on Import

Hello All,

Using Thingworx 6.5.0-b460 and thingworx-all-6.5.0-b460.jar as my library, I've been trying to create a ThingShape in code for import into Thingworx.  It gets imported, but the properties and services are not imported.  I was under the impression that I should be able to do this with 6.5.

Is this possible?  Does someone have a simple example?

Here is my test:

Code

package myPackage;

@ThingworxPropertyDefinitions(properties = {

   @ThingworxPropertyDefinition(name="MyProperty", description="", baseType="STRING", aspects={"isPersistent:true","isReadOnly:false"}),

   @ThingworxPropertyDefinition(name="MyOtherProperty", description="", baseType="NUMBER", aspects={"isPersistent:true","isReadOnly:false"}),

})

public class MyShape extends ThingShape {

   protected static Logger _logger = LogUtilities.getInstance().getApplicationLogger(HmiDisplayShape_geVisualization.class);

   @ThingworxServiceDefinition( name="MyService", description="" )

   @ThingworxServiceResult( name="result", description="", baseType="INFOTABLE", aspects={"dataShape:RootEntityList"} )

   public InfoTable MyService() throws Exception {

   return null;

  }

}

Metadata

<ThingPackages>

   <ThingPackage name="myPackage"
   description=""
   className="myPackage.MyShape"
   aspect.isSystemObject="false" aspect.isCreatable="true" />

</ThingPackages>

<ThingShapes>

   <ThingShape name="MyShape" description="" thingPackage="myPackage" aspect.isSystemObject="false" />

</ThingShapes>

1 REPLY 1
qn
12-Amethyst
12-Amethyst
(To:amiller1)

Hi, what is the Extension SDK version are you using ?

Announcements


Top Tags