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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How custom event trigger any service?

bgupta-2
9-Granite

How custom event trigger any service?

Dear Team,

How custom event trigger any service?

6 REPLIES 6

You just need to subscribe to the corresponding event, and on the subscription code you can call any service.

hi

 

i have the same problem, and the problem is with subscription code.

 

I am new to TWorx and still trying to find my way in it.

 

I have a timer which i created a subscription to it from my thing, my thing has a service which i want it to run when ever the timer fires, but still i can't figure out what code i have to add in my subscription to execute the service.

 

can you help please

If you have a service implemented on the Thing, you just need to call it from the subscription:

 

me.myServiceName();

 

That's all.

thank you for your reply.. and I tried it but the property value did not get updated ...

I am not trying to give any one a hart attack.. but i attached a screen shot I hope it can give you a clue..

 

the services I am trying to run , call some property values from a remote server..

when I use the test button on the service page it's run perfectly and the property values change.. but with the timer thing, nothing get updated...

 

i tried :

me.myServiceName(test3);

me.test3();

me.test3(test3);

 

but nothing change ...

 

sorry again... and thank you for your help...

by the way.. the output of test3 is an XML file with some property value.

 

I added anther service the give a random number and it worked fine ...

 

but still the first service "test3" do not get executed .. and property value do not change ....

thank .. it worked , i just restarted my PC and start from scratch ...

 

thanks :-)

Top Tags