Auto-configuration

This section walks you through integrating Atoti Limits with an Atoti Server via auto-configuration. This feature was introduced in V1.1.0.

note

The configuration provided in Manual Configuration is still a viable option, but the auto-configuration is now the recommended approach.

Auto-configuration

As per the Manual Configuration, the following properties are required to enable Atoti Limits to connect to an already running Atoti Server:

  • limits.connected-server.url.map
  • limits.connected-server.as-of-date.map
  • limits.connected-server.auth.map
  • limits.rest-url
  • limits.auth
  • content.server.url
  • content.server.auth

Some of these properties can be auto-configured at runtime by the Atoti Server. Here’s how to do this:

1. Import ‘LimitsAutoConfig’ into the Atoti Server

Maven dependency:

  <dependency>
    <groupId>com.activeviam.limits</groupId>
    <artifactId>limits-auto-config-{AP VERSION}</artifactId>
    <version>{LIMIT MODULE VERSION}</version>
  </dependency>

Currently, auto-configuration is available for the following Atoti Server versions:

Atoti Server version Auto-config artifact Notes
5.9.X limits-auto-config-ap59
5.10.X limits-auto-config-ap510
5.11.X limits-auto-config-ap511
6.0.X limits-auto-config-ap60 Compatible with Java 11
6.0.X-sb3 limits-auto-config-ap60-sb3 Requires Java 17

Java import:

import org.springframework.context.annotation.Import;
import com.activeviam.limits.autoconfig.impl.LimitsAutoConfig;

@Import( LimitsAutoConfig.class )
public class ActivePivotApplication {
	// Spring App
}

2. Start the Limits server

Start the Limits server using the installation instructions. Limits will wait for a connection from the Atoti Server.

3. Start the Atoti Server with the following properties

Property Description Required Default Value
limits.rest-url The URL where Limit’s REST APIs are located, Ex: http://localhost:3090/limits/rest/v2/. true null
limits.auth The authentication to use in REST requests to the Limits server from the connected Atoti Servers. true null

One of each of the following two sets of properties are required (i.e. either 1a or 1b and either 2a or 2b) . The first takes precedence over the second (a takes precedence over b). Note that a org.springframework.security.core.userdetails.UserDetailsService must be defined for the username options to work.

Set Property Description Default Value
1a limits-connected-server.auth The base-64 encoded authentication used to auto-configure the authorization for the module to connect to the Atoti Server null
1b limits-connected-server.username The username used to auto-configure the authorization for Limits to connect to the Atoti Server null
2a content.server.auth The base-64 encoded authentication used to auto-configure the authorization for the module to connect to the Atoti Content server null
2b content.server.username The username used to auto-configure the authorization for the module to connect to the Atoti Content server null

The following properties can be provided but are optional:

Property Description Required Default Value
limits.connection.delay The time delay in milliseconds between consecutive attempts to connect to the module false 10000
limits.connection.attempts The number of attempts to connect to the module before quitting. If less than zero, the Atoti Server will continuously try to connect. The Atoti Server will also try to reconnect if Limits is stopped and restarted. false -1

note

In most production environments the server.root.url property (listed at the bottom of this page) should also be specified.

You are connected!

Your Atoti Server should now resolve and register the correct LookUpPostProcessor (depending on the Atoti Server version being used), auto-configure the properties required by Atoti Limits, send these properties to the Limits server at limits.rest-url and the module will connect to your Atoti Server.

Startup sequence does not matter

The auto-configuration does not care if your Atoti Server or your Limits server is up first. As long as limits.connection.attempts has not been reached, your Atoti Server will continuously try to send information to the module.

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, even if they are present in the content server. Sometimes this can be fixed by setting the property contentServer.context-values.ignore to false.

Auto-configuration properties

The following optional properties can be used to start the Atoti Server in the event that the server cannot auto-configure the properties.

Property Descripton Example
server.root.url The absolute root url of the Atoti Server. If defined then server.protocol, server.hostname and server.port need not be specified. https://localhost:8080
server.name The name of the Atoti Server. Used as the (case-sensitive) folder name of Limit definitions. FRTB
server.protocol The protocol used by the Atoti Server (defaults to http) https
server.hostname The hostname of the Atoti Server localhost
server.port The port of the Atoti Server 8080
limits-connected-server.url The URL of the Atoti Server’s cube discovery http://localhost:8080/frtb-starter/activeviam/pivot/rest/v8/cube
limits-connected-server.kpi-path The path to get the KPI permissions properties/property-files/kpis
limits-connected-server.as-of-date The slicing date dimension present in the Atoti Server cube. Notation is Level@Hierarchy@Dimension AsOfDate@Date@Dates
content.server.url The URL of the content server http://localhost:8080/frtb-starter/activeviam/content/rest/v7
limits-connected-server.level-path-url The URL of the level path rest service http://localhost:8080/frtb-starter/services/rest/v1/levelPath/

Note that the auto-configuration can be disabled by setting the following property to false.

Property Description Default
limits.auto-config-enabled If false, then the auto-configuration methods will not be fired true