The IEvaluationTaskManager and IEvaluationService
The IEvaluationTaskManager orchestrates the evaluation of limits. The default implementation of this interface can be found in DefaultEvaluationTaskManager.
The IEvaluationService contains the logic for evaluating limits. The default implementation of this interface can be found in DefaultEvaluationService. For
both of these interfaces, you can define your own implementation - see Adding Custom Evaluation Logic for more information.
When a breach or warning is detected, an incident is recorded, the incident workflow is updated, and an incident*.csv file is generated. For details on the incident*.csv file, see Incidents file.
Optionally, you can also store passes, which are limit evaluations that do not result in a breach or warning. See the
Limit Status screen for more information.
Limit evaluations through the IEvaluationService can either be scheduled or executed on-demand.
Scheduled evaluations
TheIEvaluationTaskManager automatically schedules future evaluations for limit structures with an Intraday polling frequency.
You can configure the Intraday polling frequency using the limits.alert-task.sample-rate-cron property values.
Properties
| Property | Value | Description |
|---|---|---|
| limits.evaluation.scheduler.thread-pool-size | 4 | Thread pool size for the task scheduler. |
| limits.alert-task.sample-rate-cron | 0 */5 * * * * | Cron expression for the Intraday Alert task’s cron job. |
Scheduler threads
Scheduled evaluations run on a dedicated thread pool. To change its size, setlimits.evaluation.scheduler.thread-pool-size (default: 4).
To stop a scheduled evaluation, use the unschedule endpoint.
On-demand limit evaluation
TheIEvaluationTaskManager is also responsible for evaluating limits on-demand. In general this is done through the UI by evaluating limits,
but could also be done programmatically or via REST requests.
On-demand evaluations run in parallel. To set the number of threads they use, configure the following Configuration Property:
| Property | Value | Description |
|---|---|---|
| limits.incident.evaluation.parallel-tasks | -1 | Thread pool size for the evaluation task executors. A negative value indicates that half the available processors will be used. |
| Property | Value | Description |
|---|---|---|
| limits.incident.evaluation.error.include-stacktrace | false | true if the stack trace should be available in the evaluation response to the UI. |
REST
Evaluation REST endpoints are available for: For any of the following endpoints that use anasOfDate query parameter, note that the asOfDate is optional. It is included in the examples to demonstrate the syntax, but if not provided, Atoti Limits defaults to the date
provided in the as_of_date.csv file. The result of each response is a DTO containing the number of breaches, warnings and passes (if enabled) as well as any errors encountered during evaluation.
Triggering an evaluation records the resulting incidents and creates or updates their workflow.
At the limit level
For evaluation on a per-limit basis, the following two REST endpoints can be used:Evaluate a single limit
- Endpoint:
/limits/rest/v2/limitEvaluation/limit/evaluate/{limitId} - Method: Post
- Example Endpoint:
http://localhost:3090/limits/rest/v2/limitEvaluation/limit/evaluate/12345678?asOfDate=2023-01-31
Evaluate multiple limits
The limit keys provided do not need to belong to the same limit structure.
- Endpoint:
/limits/rest/v2/limitEvaluation/limit/evaluate - Method: Post
- Example Endpoint:
http://localhost:3090/limits/rest/v2/limitEvaluation/limit/evaluate?asOfDate=2023-01-31 - Example Request Body (the limit keys):
At the limit structure level
To evaluate on a per-limit structure basis, the following two REST endpoints can be used:Evaluate a single limit structure
- Endpoint:
/limits/rest/v2/limitEvaluation/structure/evaluate/{limitStructureId} - Method: Post
- Example Endpoint:
http://localhost:3090/limits/rest/v2/limitEvaluation/structure/evaluate/12345678?asOfDate=2023-01-31
Evaluate multiple limit structures
- Endpoint:
/limits/rest/v2/limitEvaluation/structure/evaluate - Method: Post
- Example Endpoint:
http://localhost:3090/limits/rest/v2/limitEvaluation/structure/evaluate?asOfDate=2023-01-31 - Example Request Body (the limit structure keys):
Evaluate by KPI
This is equivalent to evaluation per limit structure. To evaluate a KPI against the business cubes, use the following REST endpoint:- Endpoint:
/limits/rest/v2/limitEvaluation - Method: Post
- Example Endpoint:
http://localhost:3090/limits/rest/v2/limitEvaluation/evaluate - Example Request Body:
At the application level
This endpoint evaluates all approved limits:- Endpoint:
http://localhost:3090/limits/rest/v2/limitEvaluation/evaluate/all - Method: Post
- Example Endpoint:
http://localhost:3090/limits/rest/v2/limitEvaluation/evaluate/all
This endpoint is not optimized and may not be performant.
Unschedule tasks from the TaskScheduler
To unschedule a task from theIEvaluationTaskManager, use the following REST endpoint:
- Endpoint:
/limits/rest/v2/limitEvaluation/unschedule - Method: POST
- Example Endpoint:
http://localhost:3090/limits/v2/rest/limitEvaluation/unschedule
true if the task is unscheduled successfully, false otherwise):