Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Is there any way to get notified when new things are created?
You could have an event / subscription on the ThingStart event
Thank you Pai, I am having problems finding documentation on replication, can you point me in the right direction?
ThingStart event is when an existing thing starts. The question is about addition of new things runtime. The thing is not on hand to create subscription on.
Hi Vinay,
New Things will be created by Composer or by a Custom Mashup? if it's a custom Mashup, should be easy to wrap Resources["EntityServices"].CreateThing(params) service into a custom one and throw a Custom "CreateThing" event.
Carles.
It might be created by any means, that is external to the system. At best, there can be knowledge about what ThingTemplate or ThingShape it might inherit.
Another Option can be something like this:
Sure, that can be done and is being considered. Just wanted to find out if there is an elegant way to do it by receiving notification instead.
I like what Carles suggests, at some point in time something runs to create the new Thing, wrap it into there.
With ThingStart, I didn't want to go too deep, but add a boolean with default of FALSE that toggles to TRUE after your notification routine is done.
Put the code into a ThingShape that is always part of your ThingTemplate.
And this way you can use ThingStart to get notification.
Now for notification you can set up email, text, some log entry etc. (wasn't sure if you were wondering about how to do notification as well)