Developing risk indicators
Surveillance Insights supports risk indicators that are written in Java.
Risk indicator developers must use the Java-based framework that is provided with Surveillance Insight.
The following diagram shows the trade framework:

- Run the TradeAnalytics job to execute all of the used risk indicators. For more information, see Executing trade use case implementations
- The job gets all of the published trade models from RMS and finds all of the trade risk indicators that are present in the models.
- The job then uses the Java reflection API to instantiate the risk indicators by using the implementationClass property that is set on the risk indicator.
- All of the risk indicators are expected to extend the TradeRiskIndicator abstract class and implement the detectRisk method in it. This method is called by the TradeAnalytics and the TradeDataSource object, which contains the methods to read the trade data.
- The risk indicator implementation then calls the necessary get methods from the TradeDataSource object and executes the risk detection logic.
- The results of the detectRisk method are risk evidence and trade evidence. Risk evidence is populated in the RiskEvidence object. These are high-level representations of the detected risk. Each piece of risk evidence must be linked to the corresponding trade evidence that is actual raw data evidence for the risk.
- The TradeAnalytics job persists the evidence to the SIFS database