How to read threshold data from a route

This cookbook applies for new Thresholds and Dispersion Multipliers types and will not work for ThresholdLevels - old and BaselineMultipliers - old.


You have injected Thresholds or Dispersion Multipliers values from the Data Integration screen or using a WebService. You have followed the procedures in the How to inject thresholds and dispersion multipliers values cookbook. 

This topic provides an example on how to read threshold data from a route.


The following route works assuming you have an observed attribute named ThresholdRisk (the one you configured in How to inject thresholds and dispersion multipliers values) and a query called readThreshold.

Configure the readThreshold query

Start with configuring the query that your route requires to read threshold data.

  1. On the main menu, click the cog icon > Data Integration
  2. On the left menu, click Queries
  3. In the Name field, enter readThreshold.
  4. Click the Add dimension button, and select the Process dimension. 
  5. Click the Add Value button and select Name and the relevant threshold value, for example, thresholdRisk.

Write the route

The following provides an example route to read threshold data.

To create a route, on the left menu click Routes.

Read threshold data route
 <?xml version="1.0" encoding="UTF-8"?>
<routes xmlns="" xmlns:u="">
        <from uri="timer://once?repeatCount=1"/>
        <setProperty propertyName="tnd-query.parameters">
                <u:map-entry key="tnd-query.referenceTime">
        <to uri="tnd-query:readThreshold"/>
        <setHeader headerName="thresholdValue">
        <log message="The threshold value is ${header[thresholdValue]} for the first rule"/>
        <to uri="mock:thresholdValues"/>

Once you start your route, the logs for the route indicate the threshold value for any given rule. 

Related Links