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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Thing Template and Dynamic Thing Template

SrijithKrish
12-Amethyst

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

1 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)

 

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

Top Tags