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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Missing DataTable from composer created through service

MG_2602
9-Granite

Missing DataTable from composer created through service

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?

1 ACCEPTED SOLUTION

Accepted Solutions
knagata
14-Alexandrite
(To:MG_2602)

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.

View solution in original post

2 REPLIES 2
PaiChung
22-Sapphire I
(To:MG_2602)

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

knagata
14-Alexandrite
(To:MG_2602)

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.

Top Tags