Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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>
Hi, what is the Extension SDK version are you using ?