Hi All,
I have created an infotable in eclipse extension and try to plot as a chart. I can able to see the data on grid by checking "ShowAllColoumns". But i can,t able to plot as chart.
How can i create a datashape with in eclipse and import into thingworx?
Thanks & Regards,
Sathishkumar C.
Solved! Go to Solution.
I saw in a widget here, and maybe you can try create a folder inside your zip file with the entities. Following the architecture:
- MyExtension.zip
That is the example of the xml file that defines the data shape that I found:
<?xml version="1.0" encoding="UTF-8"?>
<Entities
build="b140"
majorVersion="8"
minorVersion="2"
modelPersistenceProviderPackage="PostgresPersistenceProviderPackage"
revision="1"
schemaVersion="1020"
universal="">
<DataShapes>
<DataShape
baseDataShape=""
description=""
documentationContent=""
homeMashup=""
lastModifiedDate="2018-03-20T14:54:13.211+02:00"
name="GanttChartData"
projectName=""
tags="Applications:GanttChart;Applications:Testing">
<avatar></avatar>
<DesignTimePermissions>
<Create></Create>
<Read></Read>
<Update></Update>
<Delete></Delete>
<Metadata></Metadata>
</DesignTimePermissions>
<RunTimePermissions></RunTimePermissions>
<VisibilityPermissions>
<Visibility></Visibility>
</VisibilityPermissions>
<ConfigurationTables></ConfigurationTables>
<FieldDefinitions>
<FieldDefinition
baseType="NUMBER"
description=""
name="duration"
ordinal="8"></FieldDefinition>
<FieldDefinition
baseType="DATETIME"
description=""
name="end"
ordinal="4"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="id"
ordinal="1"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="name"
ordinal="2"></FieldDefinition>
<FieldDefinition
baseType="NUMBER"
description=""
name="percentage"
ordinal="5"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="relationships"
ordinal="7"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="resource"
ordinal="6"></FieldDefinition>
<FieldDefinition
baseType="DATETIME"
description=""
name="start"
ordinal="3"></FieldDefinition>
</FieldDefinitions>
</DataShape>
</DataShapes>
</Entities>
Hope it works and help.
Hi @Sathishkumar_C not sure if you have already tried, is this not working when you create Configuration Table? This creates the datashape fields
Hi @Sathishkumar_C configuration table option which i mentioned would be if you have like a configuration section in your entity.
If you are just looking to create a data shape you can invoke the EntityServices function CreateDataShape()
InfoTable myIF = new InfoTable();
FieldDefinition Field1 = new FieldDefinition("Field1", BaseTypes.INTEGER);
EntityServices es = new EntityServices();
String name = "CustomDataShape";
String description = "Created from Extension";
TagCollection myTag = null;
myIF.addField(Field1);
try {
es.CreateDataShape(name, description, myTag, myIF);
_logger.info("Successfully created datashape" + es.getName());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
_logger.error("Failed to create DS");
}
I don't know if this will help, how can I create a thing that is a data shape on eclipse?
@vxavier may be put it as part of a service in extension and then you can invoke this service on the platform to automatically create that DS entity
I saw in a widget here, and maybe you can try create a folder inside your zip file with the entities. Following the architecture:
- MyExtension.zip
That is the example of the xml file that defines the data shape that I found:
<?xml version="1.0" encoding="UTF-8"?>
<Entities
build="b140"
majorVersion="8"
minorVersion="2"
modelPersistenceProviderPackage="PostgresPersistenceProviderPackage"
revision="1"
schemaVersion="1020"
universal="">
<DataShapes>
<DataShape
baseDataShape=""
description=""
documentationContent=""
homeMashup=""
lastModifiedDate="2018-03-20T14:54:13.211+02:00"
name="GanttChartData"
projectName=""
tags="Applications:GanttChart;Applications:Testing">
<avatar></avatar>
<DesignTimePermissions>
<Create></Create>
<Read></Read>
<Update></Update>
<Delete></Delete>
<Metadata></Metadata>
</DesignTimePermissions>
<RunTimePermissions></RunTimePermissions>
<VisibilityPermissions>
<Visibility></Visibility>
</VisibilityPermissions>
<ConfigurationTables></ConfigurationTables>
<FieldDefinitions>
<FieldDefinition
baseType="NUMBER"
description=""
name="duration"
ordinal="8"></FieldDefinition>
<FieldDefinition
baseType="DATETIME"
description=""
name="end"
ordinal="4"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="id"
ordinal="1"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="name"
ordinal="2"></FieldDefinition>
<FieldDefinition
baseType="NUMBER"
description=""
name="percentage"
ordinal="5"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="relationships"
ordinal="7"></FieldDefinition>
<FieldDefinition
baseType="STRING"
description=""
name="resource"
ordinal="6"></FieldDefinition>
<FieldDefinition
baseType="DATETIME"
description=""
name="start"
ordinal="3"></FieldDefinition>
</FieldDefinitions>
</DataShape>
</DataShapes>
</Entities>
Hope it works and help.
