Manual Configuration
This section walks you through integrating the Limits Module with the Atoti+ Java API (ActivePivot).
Configurations in the Limits Module
In limits.properties, configure the following properties:
ActivePivot Instance parameters
Some parameters are needed in order to allow the Limits module to discover and communicate with the connected ActivePivot Instance.
Property | Description |
---|---|
ap.url.map |
Mapping of the ActivePivot Instance name to the URL of its /pivot/rest/vX/cube . vX should be replaced with the corresponding version identifier for your ActivePivot version. |
ap.asOfDate.dim.map |
Mapping of the AsOfDate dimension, hierachy, and level of the ActivePivot Instance. “Level@Hierarchy@Dimension” |
ap.auth.map |
Mapping of the ActivePivot Instance’s credentials to use to create new KPIs and read Cube structures, such as dimensions and measures. This is a Base64 encoded “User:Password” string. |
limits.rest.url |
The URL where Limit’s REST APIs are located, Ex: http://localhost:3090/limits/rest/v1/ . |
limits.auth |
The authentication to use in REST requests to the Limits server from the connected Servers. |
content.server.url |
The URL of the remote Content Server. Ex: http://localhost:8080/frtb-starter/content |
content.server.auth |
The encoded authentication to use in REST requests to the Content Server. |
Accelerator Authentication
The encoded authentication is needed for Limits to be able to communicate with the connected Accelerator. This encoded string can easily be created
using Java’s java.util.Base64
utility. The format of the encoded authentication is “user:password”. This encoded string will be used in the REST request header when communicating between different components remotely.
Here’s an example of how to generate the string using Java:
String encodedAuth = Base64.getEncoder().encodeToString(("user:password").getBytes())
// Value of encoded auth:
encodedAuth = "dXNlcjpwYXNzd29yZA=="
Here’s an example snippet of what these properties look like in the limits.properties
file:
ap.url.map={'MRA': 'http://localhost:10010/risk-activepivot/pivot/rest/v5/cube', 'FRTB': 'http://localhost:8080/frtb-starter/pivot/rest/v5/cube'}
ap.configuration.kpi.path.map={'FRTB': 'configuration/kpis'}
ap.asOfDate.dim.map={'MRA': 'AsOfDate@Date@Dates', 'FRTB': 'AsOfDate@Date@Dates'}
ap.auth.map={'MRA': `dXNlcjpwYXNzd29yZA==`, 'FRTB': `dXNlcjpwYXNzd29yZA==`}
limits.rest.url=http://localhost:3090/limits/rest/v1/
limits.auth=dXNlcjpwYXNzd29yZA==
content.server.url=http://localhost:8080/frtb-starter/content
content.server.auth=dXNlcjpwYXNzd29yZA==
Path to the directory alerts written to
note
The path needs to be part of the input.data.root.dir.path as the CSV source picks up the alert file real time and saves the alert to the datastore.
alert.output.data.dir.path=${input.data.root.dir.path}/data/alert
task-scheduler-thread-pool-size=4
Intraday Observation Frequency
Alert task is automatically scheduled based on the following setting:
- sample-rate-cron=0 */5 * * * *
Parent-Child hierarchies
For Scopes of Parent-Child hierarchies, the hierarchy name can optionally be provided. However, if there are multiple hierarchies that contain the same level name, then the hierarchy will
need to be specified with the level name. The format for this is:
Testing properties
Target directory for Export
limit_export.target_dir=extractionOutput
Test file’s path for Upload
limit_upload.file_path=limits_approve_uploadTest.csv
note
For testing Uploading and Exporting Limits, the following properties must be set either in properties file or as Spring arguments.
Reference Data
- limits_approve_mra.csv is for the Market Risk Accelerator. By default, it is located under limits-starter/src/test/resources/data-samples/data/2018-09-28 and loaded during startup.
- limits_approve_frtb.csv is for the FRTB Accelerator, located in limits-starter/src/test/resources/data-samples/data/. Please relocate it to the “date” folder if you run Limits with FRTB.
Changes in ActivePivot
In order for ActivePivot to work with Limits, Accelerators need to add the following:
Include the dependencies in the pom.xml
For the LevelPath restful endpoint:
<dependency>
<groupId>com.activeviam.apps</groupId>
<artifactId>services</artifactId>
<version>1.11.0-AP5.10</version>
</dependency>
LookupPostProcessor:
Depending on the AP version your ActivePivot, import the appropriate artifact according. For AP 5.9, AP 5.10 and AP 5.11:
<dependency>
<groupId>com.activeviam.limits</groupId>
<artifactId>lookup-post-processor-ap59</artifactId>
<version>{LIMIT MODULE VERSION}</version>
</dependency>
<dependency>
<groupId>com.activeviam.limits</groupId>
<artifactId>lookup-post-processor-ap510</artifactId>
<version>{LIMIT MODULE VERSION}</version>
</dependency>
<dependency>
<groupId>com.activeviam.limits</groupId>
<artifactId>lookup-post-processor-ap511</artifactId>
<version>{LIMIT MODULE VERSION}</version>
</dependency>
<dependency>
<groupId>com.activeviam.limits</groupId>
<artifactId>lookup-post-processor-ap60</artifactId>
<version>{LIMIT MODULE VERSION}</version>
</dependency>
Register the LookUpPostProcessor
The LookUpPostProcessor needs to be registered within ActivePivot for ActivePivot to be able to use it. You can register the LookUpPostProcessor statically anywhere in your ActivePivot configuration with the following:
LookUpPostProcessor.addMeasureToRegistry();
Add the LevelPathRestServiceConfig
import com.activeviam.services.levelpath.LevelPathRestServiceConfig;
@Configuration
@Import(value = {
LevelPathRestServiceConfig.class
}
If your AP is running with AP 6.0, the LevelPath config should look like this:
import com.activeviam.services.levelpath.LevelPathRestService;
@Configuration
@Import(value = {
LevelPathRestService.class
}
note
Ensure that within the ActivePivotConfig of your connected accelerator, the contextValueManager method is not setting the ActivePivotContentService to null. If the ActivePivotContentService is null, KPIs will not appear in the UI.
contextValueManager.setActivePivotContentService(this.apCSConfig.activePivotContentService());
Startup Sequence Matters
As the Limits Module creates the KPI in the business cubes automatically, it is important to start up the business AP instances fully before starting up Limits.