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

How to send current value of a property from ThingWorx to a web service on triggering of an alert(in the form of json)

Newbie

How to send current value of a property from ThingWorx to a web service on triggering of an alert(in the form of json)

when an alert is triggered, the instant value of that property should be passed to a web service through a json.

2 REPLIES 2

Re: How to send current value of a property from ThingWorx to a web service on triggering of an alert(in the form of json)

Hi Priyanshi, you can try the following steps to achieve what you are looking for :

  1. Create an alert on the property, if doesn't already exist
  2. Create a service that outputs the data in the required data type e.g. Json which needs to be passed to the web service (see screenshot below) and for getting the current value of the property you can use the Stream and it's generic service GetStreamEntriesWithData or QueryStreamEntriesWithData (depending on your requirement)

     3. Create a subscription with Event -> Alert and select the Property on which the Alert will be fired and you would call this service created in above step (Step 2)

Hope this helps.

Re: How to send current value of a property from ThingWorx to a web service on triggering of an alert(in the form of json)

How to get the value of a property at that very instance when the alert is triggered. Please could you provide some sample code for the script to get the current value from property in json form

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________