Skip to main content
Dec 26, 2019 2:48 PM UTC
Solved

Do we have an ability to create Expression Rules at Thingworx?

We have possibility to creating expression rules in Axeda platform(see more: https://community.ptc.com/t5/IoT-Tech-Tips/Axeda-Expression-Rules/m-p/532448#M815)
Could we create something like this for things in Thingworx platform?

Note that I have a lot of things, so could it possible to set rules only for my thing template and use it in all of my inherited things?

and1Answer
Dec 30, 2019 2:36 PM UTC

In this case we compare the value with some default value and the subscription will trigger when the condition will be true, but in my case I just need the trigger subscription when my data has changed. I through about using an event + subscription that should help me, but I decided to ask the community if we had a different way that would be better or more perform and more flexible

2 replies

Dec 30, 2019 2:12 PM UTC

Yes it is possible to execute customized actions when property values change, and yes, these rules can be created to apply to Thing Shapes, Thing Templates, or individual Things. You do this in 2 steps. First, create an Alert which defines the property, value, and condition to monitor. Second, create a Subscription to your alert that defines the action taken. Here is a guide that walks through how this is done step-by-step:

https://developer.thingworx.com/en/resources/guides/thingworx-foundation-quickstart/create-alerts-and-subscriptions

and1AuthorAnswer
Dec 30, 2019 2:36 PM UTC

In this case we compare the value with some default value and the subscription will trigger when the condition will be true, but in my case I just need the trigger subscription when my data has changed. I through about using an event + subscription that should help me, but I decided to ask the community if we had a different way that would be better or more perform and more flexible