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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Thing Template and Dynamic Thing Template

SrijithKrish
13-Aquamarine

Thing Template and Dynamic Thing Template

Hi

 

I have a doubt regarding Thing Templates, when I am using a thing template inside a mashup I am not able to get my custom services. But if I am using the thing templates by ticking the dynamic box then I am able to get my custom services. While using the custom services from the dynamic templates they are not working as written.

 

I would like to know the exact reason.

 

Thank You and Regards

Srijith

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:SrijithKrish)

All the custom services created on a ThingTemplate are considered to run in the context of an instantiated Thing.

So you will only see services that apply to a ThingTemplate itself when you select ThingTemplate - like GetImplementingThings (what things use this Template)

But when you set it to Dynamic, it becomes the context of an instantiated Thing that you specify through the Entity parameter, now you will see GetPropertyValues and your custom services (what are my thing property values)

 

View solution in original post

4 REPLIES 4
PaiChung
22-Sapphire I
(To:SrijithKrish)

All the custom services created on a ThingTemplate are considered to run in the context of an instantiated Thing.

So you will only see services that apply to a ThingTemplate itself when you select ThingTemplate - like GetImplementingThings (what things use this Template)

But when you set it to Dynamic, it becomes the context of an instantiated Thing that you specify through the Entity parameter, now you will see GetPropertyValues and your custom services (what are my thing property values)

 

SrijithKrish
13-Aquamarine
(To:PaiChung)

Hi @PaiChung 

 

Thank You!!

So dynamic template can be used if I need to access the instantiated Thing, right? If I will have to use a function that is general to all the things of the template I will have to make a thing outside the template referring the template properties or the template right? 

PaiChung
22-Sapphire I
(To:SrijithKrish)

Correct!

slangley
23-Emerald II
(To:SrijithKrish)

Hi @SrijithKrish.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others in the community.

 

Regards.

 

--Sharon

Announcements


Top Tags