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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Operationalize an Analytics Model Guide Part 2

100% helpful (1/1)



Step 5: Create Event


Events are automatic analysis jobs which are submitted based on a pre-defined condition.

In this step, we'll configure an Analysis Event which will execute automatically whenever there is a datachange in our simulated engine.


  1. On the ThingWorx Composer Analytics tab, click ANALYTICS MANAGER > Analysis Events.



  2. Click New....



  3. In Source, search for and select AMQS_Thing.
  4. In Event, select DataChange.
  5. In Property, select FlipFlop.
  6. In Provider Name, select Vibration_Provider.
  7. In Model Name, select the published Model.



  8. Click Save.



Map Event Data


Map the Properties of AMQS_Thing, to the fields required to evoke an Analysis Job.


  1. Select the previously-created Event, and click Map Data....



  2. Click Inputs Mapping.



  3. In Source Type, select Thing.
  4. In Source, search for and select AMQS_Thing.



  5. On the left, select s1_fb1, one of the sub-fields of AMQS_Thing's InfoTable Property.
  6. On the right, select _s1_fb1, the first frequency band required for the Model to make a prediction.



  7. Click the Map button in the center.



  8. Repeat this mapping process for for s1_fb2 through s1_fb5.



  9. Map causalTechnique in the same manner.
    • This is a String Property in AMQS_Thing with a Default Value of FULL_RANGE, the same technique we used in our earlier true/false testing.
  10. Map goalName to goalField in the same manner.

    • This is a String Property in AMQS_Thing with a Default Value of low_grease, the same goal we used in our earlier testing.



  11. Click Results Mapping on the left.



  12. Map _low_grease to Result_low_grease.



  13. Map _low_grease_mo to Result_low_grease_mo.



  14. Click Close to close the mapping pop-up.


Enable Event


Now that we've done the mapping from Foundation to Analytics, let's confirm that everything is correct.


If so, we'll then Enable the Analysis Event so that it can automatically generate and process Analysis Jobs.


  1. Select the mapped Analysis Event.



  2. Click View....


  3. Click Inputs Mapping and confirm that all mappings are correct.



  4. Click Results Mapping and confirm that all mappings are correct.



  5. At the top-left, expand the Actions... drop-down.


  6. Select Enable.


Now that you have enabled the Analysis Event, whenever AMQS_Thing's InfoTable Property changes, the new data will be submitted to Analytics Manager.


An Analysis Job will automatically run, with a predictive score sent back and stored in AMQS_Thing's Result_low_grease (Boolean) and Result_low_grease_mo (Number) Properties.




Step 6: Test Model


In this step, we'll confirm that the automatic analysis of information coming from remote devices is operational.


  1. On the ThingWorx Composer Analytics tab, click ANALYTICS MANAGER > Analysis Jobs.



  2. Uncheck Filter Completed Jobs.



  3. Select a Job and click View....
  4. Click Results.


    NOTE: You will see true or false, just as when you manually tested the Model, so you know that Analytics Manager is now automatically submitting and completing jobs with a resulting prediction.

Test Mashup


Follow these steps to confirm that the results are being sent back to ThingWorx Foundation in a way in an actionable way.


  1. Return to the AMQS_Mashup browser tab.
  2. Wait at least ~20 seconds to see multiple cycles of good and bad data (which should generate a false or true result from Analytics Manager).
  3. Note the Text Field Widgets on the right now have data.


  4. This analytical result is coming from Analytics Manager, and is the exact same output you saw in ANALYSIS JOBS.


Using this technology, you could create a paid customer service, where you offered to monitor remote engines, in return for automatically shutting them down before they experience catastrophic engine failure.


For that example implementation, you would utilize the AMQS_Thing.Result_low_grease BOOLEAN Property to trigger other actions.


For instance, you could create an Alert Event which would be triggered on a true reading.


You could then have a Subscription which paid attention to that Alert Event, and performed an action, such as sending an automatic shutdown command to the engine when it was experiencing a likely low grease event.


NOTE: We recommend that you return to the ThingWorx Composer Analytics > ANALYTICS MANAGER > Analysis Events tab and Disable the Event prior to continuing. Since the simulator generates an Event every ~10 seconds, this can create a large number of Events, which can fill up your log.




Step 7: Next Steps


Congratulations. You've completed the Operationalize an Analytics Model guide.

In this guide you learned how to:


  • Define an Analysis Provider that uses the built-in Analytics Server Connector
  • Publish a Model from Analytics Builder to Manager
  • Create an Analysis Event which takes data from ThingWorx Foundation and decides whether or not a failure is likely


This is the last guide in the Design and Implement Data Models to Enable Predictive Analytics learning path.


Learn More


We recommend the following resources to continue your learning experience:


BuildImplement Services, Events, and Subscriptions Guide


Additional Resources


If you have questions, issues, or need additional information, refer to:


CommunityDeveloper Community Forum
SupportAnalytics Manager Help Center
Version history
Last update:
‎Nov 29, 2022 02:55 PM
Updated by:
Labels (1)