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

ThingTemplate Service Calls - Things[ThingName] is not running

SOLVED
Highlighted
Newbie

ThingTemplate Service Calls - Things[ThingName] is not running

I have a problem with calling services from a thing that uses a particular ThingTemplate.

I am creating the Thing programmatically:

var params = {

             thingTemplateName: equipmentTemplate,

             description: description,

             name: equipmentName

             };

        Resources["EntityServices"].CreateThing(params);

        Things[equipmentName].EnableThing();

        Things[equipmentName].RestartThing();

Which works fine, but when I try to call a service from that Thing:

...

Things[equipmentName].AddVisibilityPermission(params);


Then it throws a Things[equipmentName] is not running error.

This only happens when using one particular ThingTemplate as the 'equipmentTemplate', all other templates 'run' fine.

Does any one know why this might be happening? I can't find any permission issues, spelling errors or anything in that ThingTemplate. We did just upgrade to 6.5 - Would that have anything to do with this one ThingTemplate?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: ThingTemplate Service Calls - Things[ThingName] is not running

Do you know if the RestartThing is completing?. and if so; when the new Thing is added and it shows up in server; can you then run your visibility permission service?. maybe it's timing issue.....

View solution in original post

4 REPLIES 4
Highlighted

Re: ThingTemplate Service Calls - Things[ThingName] is not running

Do you know if the RestartThing is completing?. and if so; when the new Thing is added and it shows up in server; can you then run your visibility permission service?. maybe it's timing issue.....

View solution in original post

Highlighted

Re: ThingTemplate Service Calls - Things[ThingName] is not running

The RestartThing should be completing, I can warn the Thing[equipmentName].name afterward.

The thing is removed when the service is called because I have it in a trycatch as to not create any ghost things. So it doesn't actually show up on the server.

Highlighted

Re: ThingTemplate Service Calls - Things[ThingName] is not running

What Template is the 'equipmentTemplate' based on?

Highlighted

Re: ThingTemplate Service Calls - Things[ThingName] is not running

Thanks for the help guys, it turns out it was a timing issue. A ThingStart subscription was being called, and I guess it didn't like that. Thanks!

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!