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

Organizations and Alerts visibility issue

fserre
1-Visitor

Organizations and Alerts visibility issue

Hi,

I have an applucation based on organizations. Each organization unit has its own things. I am trying to add alerts on things, but I cannot retrieve the alerts only related to my organization. When I call QueryAlertSummary service on AlertFunctions ressource I get the global list of alerts including those from things not related to the organization unit I am logged in.

Does anybody know if there is another service available?

4 REPLIES 4
PaiChung
22-Sapphire I
(To:fserre)

So you are saying that within the context of an Organization you are executing this call and retrieve Alerts for ALL Things vs. filtered by Organization correct?

This is because this information is in a 'regular stream'. You'll need to create a wrapping service that filters the source to return the appropriate set based on a User's visible entities.

fserre
1-Visitor
(To:PaiChung)

That's what I suspected...

So, in order to get the alert summary from unit organization, I need to call GetAlertSummary service on each thing and make a union of all results.

Or I can also use the AlertFunctions ressource and parse the result to test each row.

I don't know which way will be the more efficient. I think I'll take the first option as it allows me more flexibility, as I am also using hierarchy with networks, I'll be able to build alert list from a specific level.

Thanks Pai for your help.

Fabien

PaiChung
22-Sapphire I
(To:fserre)

Since it is in a regular stream, you can even use QueryStreamEntriesWithData and pass in a Query right away.

stanislav
6-Contributor
(To:fserre)

Hi Fabien Serre,

In case you did not manage to solve the issue, I wanted to let know that Resources["AlertFunctions"].QueryAlertSummary() does filter the result based on the visibility permissions. In case that does not happen you definitely missed something when you configured the permissions.

Make sure you set the proper Organization on the thing (machine) visibility and also make sure the current user is part of that Organization.

The Alert Summery is not persisted in a regular stream so you cannot query it.

Announcements


Top Tags