Thing Presence: Using ThingWorx Composer to Create a Custom ReportingStrategy Thing
A ReportingStrategy is a Thing descending from the ReportingStrategy Thing Template, that overrides the ReportingAlgorithm service. You can create a custom strategy in three ways: in Composer, in an extension (with a Java-backed Thing), or by importing XML.
To create a custom
ReportingStrategy using ThingWorx Composer, follow the steps in this topic. To create the
ReportingStrategy using an extension (Java-backed thing), see
Thing Presence: Custom Reporting Strategy Created in Java with the ThingWorx Extension
SDK.
To create a custom strategy in Composer:
1. Navigate to the Things panel in Composer, and click New.
2. Select a distinctive name for your strategy.
3. Select ReportingStrategy as your Thing Template for this Thing.
4. Implement your strategy:
a. Switch to the services tab and click the edit link to override the ReportingAlgorithm.
b. Write JavaScript that sets the result value, based on the appropriate business logic to evaluate the reporting status of your device.