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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

1) What is "Allow Override" in ThingWorx 9 for services? 2) Process for hiding code of any service?

ranjank
15-Moonstone

1) What is "Allow Override" in ThingWorx 9 for services? 2) Process for hiding code of any service?

For what purpose the above functionality used? Is it for hiding the code at composer level? If not, how can we hide code of any service and providing the leverage of only executing the service at composer level?

 

Please advise on both use-cases i.e. the use of allow override and process of hiding the code of any service for a thing/template/shape.

 

Thanks in advance.

ACCEPTED SOLUTION

Accepted Solutions
wposner-2
14-Alexandrite
(To:ranjank)

Think of the override capability similar to defining an interface method definition.  The best place to use it would be on a Thing Shape where you want to ensure there is a common service signature across your things.  The underlying service code on each thing may be slightly different.  For example, maybe you've got a parse service.  On one thing you need to parse XML with a specific schema, and on another thing, you've also got to parse XML, but the schema is different.  You could create your parse service with an XML input param, apply it to a template (depending on how you like to model), create two things based on that template, and then implement the unique parsing code directly on those two things.

View solution in original post

3 REPLIES 3
ranjank
15-Moonstone
(To:ranjank)

My 2nd question is similar to somewhat below JIRA ticket:-

 

https://www.ptc.com/en/support/article/CS289692

wposner-2
14-Alexandrite
(To:ranjank)

Think of the override capability similar to defining an interface method definition.  The best place to use it would be on a Thing Shape where you want to ensure there is a common service signature across your things.  The underlying service code on each thing may be slightly different.  For example, maybe you've got a parse service.  On one thing you need to parse XML with a specific schema, and on another thing, you've also got to parse XML, but the schema is different.  You could create your parse service with an XML input param, apply it to a template (depending on how you like to model), create two things based on that template, and then implement the unique parsing code directly on those two things.

slangley
23-Emerald II
(To:ranjank)

Hi @ranjank.

 

If you are satisfied with the response to your questions, please mark it as the Accepted Solution for the benefit of others with the same questions.

 

Thank you for your participation in our community!

 

Regards.

 

--Sharon

Announcements


Top Tags