Skip to main content
8-Gravel
July 10, 2023
Solved

How to monitor bound property quality in TWX and trigger other services

  • July 10, 2023
  • 1 reply
  • 2856 views
Dears,
I have amount of bound tags(greater than 1000) needed to monitor. When any quality turns to bad or other status except good, subscription should be triggered to send info. How can I config event or subscription to get this with minimal impact on system stability.
Thanks.

 

 

 

Best answer by VladimirRosu_116627

Hi @LeoChen ,

 

Your subscription code requires a fix, because you're verifying the value at the end, and you should look at the quality.

The first part will also always evaluate to true and even if you compare the oldValue to newValue, it's still simpler to just look at the quality:

if (eventData.newValue.quality!="GOOD")

1 reply

16-Pearl
July 10, 2023

Hi @LeoChen,

 

Kindly refer the attached link. I hope it may be helpful in your query.

Monitor Quality of Tags:https://community.ptc.com/t5/ThingWorx-Developers/How-to-monitor-the-quality-of-the-bound-tag/td-p/710794

 

Thanks & Regards,

Arun C

 

LeoChen8-GravelAuthor
8-Gravel
July 10, 2023

Thank you. But I need to know how to minimal impact on system. Because the count of property is to much,

Now I creat subscription with the event of AntDataChange,which is not very well.

Regards.

18-Opal
July 20, 2023

Hello,

 

I can only think of the AnyDataChange, too.

 

What exactly is the issue with this approach? Does it slow your system down? If yes, you can share the body of this subscription, maybe we'll be able to give some advice on optimizing it.

 

/ Constantine