Skip to main content
1-Visitor
April 5, 2022
Solved

Missing DataTable from composer created through service

  • April 5, 2022
  • 2 replies
  • 1109 views

Hi everyone,

 

I created a Datatable using the below mentioned snippet.

 

DataTableName = "DT." + Facility + "TableInfo";

 

Resources["EntityServices"].CreateThing({
name: DataTableName /* STRING */,
thingTemplateName: "DataTable" /* THINGTEMPLATENAME */,
projectName: "Monitoring" /* PROJECTNAME */,
tags: "Applications:Set" /* TAGS */
});
Things[DataTableName].SetDataShape({name: "DS.TableInfo"});
Things[DataTableName].EnableThing();
Things[DataTableName].RestartThing();

 

When I ran the service from the Thing itself, datatable gets created and shown in the composer but when I tried the service through mashup, datatable is not shown in the composer. On executing the same service again, it shows Datatable already exists.

 

Anybody knows, what could be the reason?

Best answer by knagata

Hello,

As it was said, there seems to be a problem with the mashup, I tried it in a TWX 9.3 environment executing the service in a simple Mashup, the problem did not reproduce. 

In the TWX >Subsystems >PlatformSubsystem, there  are two services related to ghost entities. Please execute them and try again
GetEntitiesGhost to verify the ghost entities and then DeleteGhostEntities to delete them.

2 replies

22-Sapphire I
April 5, 2022

Looks like you are probably passing in something from the mashup that is not correct and you ended up with a 'ghost' entity.

Likely you'll have to fix your mashup/code, clean up the ghost entity (there is a subsystem i believe in ThingWorx for that) and try again

knagata14-AlexandriteAnswer
14-Alexandrite
April 7, 2022

Hello,

As it was said, there seems to be a problem with the mashup, I tried it in a TWX 9.3 environment executing the service in a simple Mashup, the problem did not reproduce. 

In the TWX >Subsystems >PlatformSubsystem, there  are two services related to ghost entities. Please execute them and try again
GetEntitiesGhost to verify the ghost entities and then DeleteGhostEntities to delete them.