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

Information on ThingStart event

SOLVED
SrijithKrish
Garnet

Information on ThingStart event

Hi,

 

I had queries about the thingstart event. 

 

The query is when does this event get triggered?

 

I have a main template from which I am having 2-3 templates and I am having 2 things with each on these 2-3 templates. I am having a subscription which is using the thing start input in the super template or the main template from which the other templates are derived. I wanted to know that if I create a thing under an one of the template will this subscription go into action for all the things under the main template as in directly all the things are under this template and the subscription is written on it.

 

The structure is : 
'A' is the main template (subscription with thing start input is here)

'B' template under A

'C' template under A

'ThingB1' thing under template B

'ThingC1' thing under template C

 

Now if i make 'ThingB2' thing under template B will this subscription go into action for all the three things ('ThingB2', 'ThingB1', 'ThingC1') or just the newly created ThingB2?

 

Thanks in Advance

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Information on ThingStart event

Hi,
The ThingStart event is triggered for a Thing, as its name describes.
The behavior you described would imply that once a Thing starts (as a result of its creation in your case), then all the Things based on the same template would start again, which is not how the platform works.

I suggest to test this behavior in your ThingWorx Composer, it should not require more than 5 minutes.

View solution in original post

7 REPLIES 7

Re: Information on ThingStart event

Hi,
The ThingStart event is triggered for a Thing, as its name describes.
The behavior you described would imply that once a Thing starts (as a result of its creation in your case), then all the Things based on the same template would start again, which is not how the platform works.

I suggest to test this behavior in your ThingWorx Composer, it should not require more than 5 minutes.

View solution in original post

Re: Information on ThingStart event

Thank You @VladimirRosu 

 

I just wanted to clarify the behavior as I believe that thing start event works as you have mentioned. Once had experienced a different behavior which will definitely be due to something else.

 

Re: Information on ThingStart event

Exactly

Re: Information on ThingStart event

Could you also tell me is there anything that would restart all the other things in a go?

Re: Information on ThingStart event

As far as I remember, there is a snippet that restarts all things based on a template, called
Resources["EntityServices"].RestartDependenciesForThingTemplate(params);

Note: there's an almost identical service for ThingShape, named similarly.

Search it in the snippets section in a service and test it to be sure, as I haven't used it in a while.

If that does not work, a for loop where you manually call the RestartThing() should work equally well.

Re: Information on ThingStart event

Thank You @VladimirRosu 

 

I do not wanna use them currently just wanted to make sure that I am not using them to show that kind of behavior.....

Re: Information on ThingStart event

Hi @SrijithKrish.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community!

 

Regards.

 

--Sharon

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.