User settings management
🌐 This document is available in both English and Ukrainian. Use the language toggle in the top right corner to switch between versions. |
User settings are stored in Data Factory, and can be changed by the user via one of the following ways:
-
Onboarding process
-
User portal
-
Regulations business processes
1. Managing user settings via business processes
1.1. Connectors
To manage settings via business processes, the corresponding connector-extensions are used:
-
Settings read connector - userSettingsConnectorReadDelegate. It hase the following parameters:
-
X-Access-Token - user token for the read request
-
Result variable - business process variable, where the settings service response will be written
-
-
Updated settings saving connector - userSettingsConnectorUpdateDelegate. It hase the following parameters:
-
X-Access-Token - user token for the update request
-
Result variable - business process variable, where the settings service response will be written
-
Payload - settings that need to be saved according to the contract.
-
settings-api address is set in business process execution service configuration.
user-settings-service-api:
url: http://user-settings-service-api:8080
....
By default, the settings service relative address won’t change for different Platform installations. |
The diagram is an example of connector usage within the business process. |
1.2. JUEL function
The Platform provides another way to manage user settings - the dedicated settings() JUEL-function, which is available to the business process during modelling. The function can be used exclusively in read-only mode, and cannot change settings. To change user settings, use the corresponding connector.
The settings() function can be used:
-
As part of Camunda Expression Language (EL)
Every call of the settings() function results in a HTTP-call of Data Factory API. |
1.2.1. Contract
Return Type | Method | Example |
---|---|---|
settings(UserDto dto) |
settings(completer('user-task-input')) settings(initiator()) |
completer() and initiator() are other JUEL functions that return UserDto as a result |
1.2.2. Structures description
1.2.2.1. UserSettings
Name | Scheme | Comment |
---|---|---|
settingsId |
string |
Unique settings ID in the system |
string |
User email |
|
phone |
string |
User phone number |
communicationIsAllowed |
boolean |
Permission to use contact information for notifications |
1.2.2.2. UserDto
Name | Scheme | Comment |
---|---|---|
username |
string |
User name |
accessToken |
string |
User token |
jwtClaimsDto |
JwtClaimsDto |
The field for work with token contents as an object |
2. Managing settings via portal
User settings viewing and changing are a function of citizen/officer portals, and can be used without executing a business process. To manage user settings via portals, Data Factory methods are used:
-
GET /settings - for current settings viewing
-
PUT /settings - for settings update
The methods are available via Kong API Gateway and require user authentication.
Settings management is performed only for the current user that is logged into the system. Changing settings for another user is not available by design.