Configuring the Limits Module
This section explains how to configure properties files, data files, and ActiveViam components.
Project configuration
Properties files
Location: limits-starter/src/main/resources
File | Purpose |
---|---|
application.yml | Properties defining the content server settings, the Application database, the Audit Log database and the Activiti database, and the parameters for the starter web apps |
hibernate.properties | Hibernate (persistence and query service) properties |
logback-spring.xml | Properties for configuring the logging |
serializer.jaxb.cfg.xml | JAXB mapping used for the XML configuration of ActivePivot schemas and cubes |
limit.properties | General location high level, all purpose properties. These include REST URLs, data directory paths, cloud configurations, and server authentication tokens |
ActiveUI
Location: In the delivered source file code for the UI, limits-UI/src
File | Purpose |
---|---|
LimitsSettings.ts | Properties to define UI limits and workflow parameters |
env.js | General properties to connect to the Limits server and the Accelerator server |
You will need to specify in the ActiveUI configuration file where the ActivePivot project is running.
Note, the end-user’s browser will be connecting to the URL you specify here, so you should specify the exact host name as opposed to localhost.
The standalone application contains a limits_env.js file which will need to be updated with the correct server URL:
# The URL to use to connect to ActivePivot
activePivotServerUrl: 'http://localhost:3090',
Configuring the LimitsSettings.ts file
The Limits Settings file contains both necessary and optional settings which will be used to customize and configure your Limits UI. At the moment, the Limits module has only one custom widget. Therefore, to use it properly, you will need to customize the unique settings specific to the Limits Inventory Widget. These can be found in the table below, and should be set within the “limits_inventory-widget.server.params” as shown below.
"accelerator_story-telling-action.whitelist": ["LIMITS", "FRTB"], // This is how you turn on storytelling.
"limits_inventory-widget.server.params": { //These are where you place your settings to configure the Limits Inventory Widget.
settingName: settingValue // All possible settings can be found in the table below!
...
},
Setting | Type | Required | Description | Example |
---|---|---|---|---|
limitsServerName | string | true | The name of the limits server set in your env.js file. | “Limits” |
limitCurrencies | string [ ] | true | The list of currencies which will populate the currencies dropdown in the Limits Inventory Widget drawer. | [“EUR”, “USD”, “GBP”, “CHF”, “JPY”, “SEK”, “NOK”, “CAD”] |
auditTrailNodeColors |
|
false | The object which maps the list of statuses to their respective colors in the Audit screen. |
|
pollingFrequencyValues | string [ ] | true | The list of polling frequencies which will populate the Polling frequency dropdown in the Limits Inventory Widget Drawer. | [“EOD”,“Intraday”,“1 Day”,“1 Week”,“1 Month”,“1 Year”] |
limitsWorkflowMap |
|
true | The mapping of workflows and their participants. This setting is used to configure the Workflows section of the Limits Inventory drawer |
|
workflowTypesArray | string[] | true | The array used to determine the possible workflows. | [“warningWorkflow”,“breachWorkflow”,“limitChangesWorkflow”] |
limitTypes | string[] | true | The array used to render radio buttons allowing the user to select the type for their limit. These buttons can be found in the Limit drawer of the Limits Inventory Widget. | [“OFFICIAL”, “TEMPORARY”] |
scopeDetailsFieldNames |
|
true | Do not modify this setting. This setting will be removed in the next release. |
|
kpiRuleTypes |
|
true | List which populates the KPI Rules in the Limits drawer |
|
editRulesRadioValues | string[] | true | List of values which will generate radio buttons for the Rules popover when adding a new KPI rule in the Limits drawer | [“value”, “absolute value”] |
roles | string[] | true | The list of roles which will populate the dropdowns for selecting participants per workflow. | [“ROLE_USERS”, “ROLE_MANAGERS”] |
limitsRESTEndpoint | string | true | The endpoint which points to the Limits rest service. | “/limits/rest/v1/limitDefinition” |
limitsTableMdx | string | true | The mdx used for the initial query for the Limits Inventory Widget table | Click to open the example query |
ActiveUI Module Federated Endpoints
The Limits UI is based on the activeUI module federated app. The activeUI app has a couple of endpoints you can use to configure it further. In the case of the Limits project, there are two endpoints that need to be used for the project to work properly. They can be found inside of the index.tsx file of the project. These are:
import {
withClientSettings,
} from "@activeviam/accelerator-sdk";
import { limitsSettings } from "./configurations/LimitsSettings";
import { limitsStoreEnhancer } from "@activeviam/limits-sdk";
const accSdkHoc = withClientSettings(limitsSettings);
configuration.higherOrderComponents = [accSdkHoc];
configuration.storeEnhancers = [
...(configuration.storeEnhancers || []),
limitsStoreEnhancer,
];
WithClientSettings HOC
The withClientSettings HOC builder allows you to store settings inside of the HOC, which wraps the entire application. The limitsSettings object mentioned in the previous section contains all configuration required for our widgets to work. These widgets read from the HOC using the useAccSdkSettings
hook, which you can import from accelerator-sdk. Feel free to add your own “configurations” or “settings” into this withClientSettings builder, making sure that there aren’t any conflicts in key names. If there are conflicting keys, the application will break.
LimitsStoreEnhancer
The limitsStoreEnhancer is a redux store enhancer used for some functionality in the Limits Inventory widget. Without it, the Limits Inventory Widget will not work properly. You can read more about activeUI store enhancers on the activeUI documentation.
Configuring multiple servers for limits in env.js
Element | Customization | Property |
---|---|---|
apServers | For each server listed, set the value to true if the server is performing the limits workflowFor example, apServers: [ { name:'MRA', url: 'http://localhost:3090', csServerName: 'MRA', isLimits: true |
limitsAllowed |
(none) | Specify the application server names that will use limits. For example, expectedLimitsServerNames: ['MRA', "FRTB"], |
expectedLimitsServerNames |