Getting Started
This guide will help you set up IPF Studio Configuration DPS in your project to start using dynamic configuration capabilities backed by the Custom Processing Settings service.
Prerequisites
Before getting started, ensure your project is set up as a Spring Boot application, as the adapter relies on Spring Boot Auto-configuration.
|
The DPS adapter relies on variable definitions created in the Rules Designer. These variables follow the same principles and lifecycle as standard Rules Designer variables, and the adapter simply provides a dynamic configuration source for them at runtime. For details on how variables are defined and used within Rules Designer, see: Rules Framework - Dynamic Expressions Overview |
Adding Dependencies
Add the following Maven dependencies to your project:
<dependency>
<groupId>com.iconsolutions.dsl</groupId>
<artifactId>ipf-studio-configuration-spring-starter</artifactId>
</dependency>
<dependency>
<groupId>com.iconsolutions.ipf.studio.configuration.dps</groupId>
<artifactId>ipf-studio-configuration-dps-spring-starter</artifactId>
</dependency>
The ipf-studio-configuration-spring-starter dependency is required to ensure that the IPF Studio Configuration framework is enabled in your application.
What Gets Configured
The ipf-studio-configuration-dps-spring-starter dependency provides Spring Boot Auto-configuration that automatically configures the following components:
-
DpsConfigurableValueSource: Integrates with IPF Studio Configuration framework and is automatically registered as a
ConfigurableValueSourcein theConfigurableValuesManager -
CpsKafkaNotificationHandler: Handles Kafka notifications for configuration changes
-
CustomProcessingSettingsQuery: Query interface to interact with CPS client
-
CPS Client Connector: Communication layer to CPS service
Configuration
The adapter requires minimal manual configuration as Spring Boot auto-configuration handles most setup automatically. The system will:
-
Automatically register the
DpsConfigurableValueSourcebean as aConfigurableValueSource -
Set up Kafka notification handling for real-time configuration updates
-
Establish connection to the Custom Processing Settings Service
Required Configuration
To use the adapter, you need to configure the settings as set up in the example configuration file below:
ipf.dynamic-config-adapter {
# Dynamic Configuration Types supported by the dynamic config adapter
dynamic-config-types: ["customProcessingSettings"]
# the period at which the values are refreshed automatically
value-refresh-period: 1m
# list of setting categories to be retrieved upon refresh
setting-categories: ["InitiationSettings", "FXSettings"]
# Correlation Entries map dynamic configuration values to the variables used by external systems
correlation-entries: [
{
# variable key
# For IPF studio, variable keys are made of the model name and variable name
destination-variable-key: "test-model1.fxAllowed"
# the type of the variable used on the registry; Currently supported types:
# string
# stringArray
# number
# numberArray
# boolean
variable-value-type: boolean
# dynamic configs to be used to source values to be refreshed into the dynamic variables
source-dynamic-config: {
# the type of dynamic configuration
config-type: "customProcessingSettings"
# the name of dynamic configuration
config-name: "fxEnabled"
}
}
]
}
Refer to Configurations.