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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

how can i set up alerts threshold from a mashup ?

anassNasser
8-Gravel

how can i set up alerts threshold from a mashup ?

hi community ,

how can i access to alertName from a service called in mashup ?

- I made a service that update alert threshold for all things of a template.

- I want to modify threshold from mashup (see picture) using textfield widget and call the first service when I click on a button (validate).

please help , and thank you in advance.

 

 

 

6 REPLIES 6

Hi,

 

You can use AddOrUpdateAlerts() service available at the level of the Thing or Thing Template.

Please take a look here: https://www.ptc.com/pt/support/article?n=CS299728

Your service should have as input the range values you want to update and the output - nothing.

 

To get the name of the alerts for a specific property you can use GetAlertDefinitions() at the Thing level.

 

Hope it helps,

Raluca Edu

First of all, thank you for your response.

 

I created 3 services that us AddOrUpdateAlerts() : below _ above _in range. i think I should put all those services on  a subscription if i want to use the button to trigger those services ?

 

also i have a problem with thresholds precisely at the point of calling service for in range   : 

for example : alert1 : measure <10 ===> call service for below alert

                      alert2: 10<=measure <20 ===> call service for in range alert

                      alert3: 80<=measure <100 ===> call service for in range alert

                     alert4: measure >100 ===> call service for above alert

so how can i call a service two time from mashup.

Hi,

 

Subscriptions are used to be executed when a specific event is happening (Alert, DataChange), so if this is corresponding to what you want to accomplish then it is ok to use it.

Otherwise, think what you want to trigger the service: a click on a button, selected rows changed, all data changed etc.

To execute a service more than once in mashup, you need to change the bindings, so one idea is to get once again the service in the Data panel and create once again the bindings.

 

I would work with one service for every alert, but I don't know exactly what you need to do or if this fits to your case.

 

Hope it helps,

Raluca Edu 

 

 

Thank you Raluca Edu ,

i created one service for every alert, but I have two alert that use the same alert "In range". but when I trigger my service using a button event, it doesn't work but IF I call my service on my thing it works.( it doesn't change my alerte threshold value).

thank you 

 

Anass nasserallah

slangley
23-Emerald II
(To:anassNasser)

Hi @anassNasser.

 

You will need to check the parameters being passed to the button to validate they match those you're entering when you run it as a service.  Basically, just validating that you're passing the same information.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:anassNasser)

Hi @anassNasser.

 

If one of the previous responses allowed you to find a solution, please mark the appropriate one as the Accepted Solution for the benefit of others with the same issue.

 

Regards.

 

--Sharon

Announcements


Top Tags