Multi-server Activation

This section walks you through adding the necessary settings to support connecting multiple solutions to Atoti Limits.

The snippet below shows you how to override the Limits UI Settings to include additional Business Solutions. Here, we specify that we want to connect Atoti Limits to the servers Atoti FRTB and Atoti MarketRisk.

note

We can set the serverNameToServerKey property to map the server key used by the UI to the catalog name from the server.

We create an object containing all default Limit settings and new solutions we want to connect to by specifying their server key (see applicationServerKeys).

This settings object is then passed into the activation function.

const { activate, limitsSettings } = await import("@activeviam/limits-sdk");

const newSettingsObject = {
    ...limitsSettings,
    "limits_management-screens": {
	    ...limitsSettings["limits_management-screens"],
		applicationServerKeys: ["FRTB","MR"],
        asOfDate: {
            MR: {
                asOfDateDimensionName: "Dates",
                asOfDateHierarchyName: "Date",
                asOfDateLevelName: "AsOfDate",
            },
            FRTB: {
                asOfDateDimensionName: "Dates",
                asOfDateHierarchyName: "Date",
                asOfDateLevelName: "AsOfDate",
            },
        },
        serverNameToServerKey: {
            FRTB: "FRTB",
            MR: "MR"
        },
     }
}

const extension: ExtensionModule = {
  activate: async (configuration: Configuration) => {
    _merge(configuration.pluginRegistry, getDefaultPlugins());
    configuration.storeEnhancers = [...(configuration.storeEnhancers || [])];

    configuration.higherOrderComponents = [
      withSandboxClients,
      ...(configuration.higherOrderComponents || []),
    ];

    activate(configuration, newSettingsObject);
  },
};