Migration
This page describes how to update Valtimo from the previous version to the current.
Change in Recipient.Type values
Scope: back-end
To meet coding standards, the Enum values of
com.ritense.valtimo.contract.mail.model.value.Recipient.Type
have been changed to all uppercase. References to these Enum values should be changed in implementations:Change uses of Type.To to Type.TO
Change uses of Type.Cc to Type.CC
Change uses of Type.Bcc to Type.BCC
Rename application property valtimo.jwt.secret
Scope: back-end
Find valtimo.jwt.secret
Find all occurrences of
valtimo.jwt.secret
and rename them all tovaltimo.oauth.public-key
. This property is usually found in theapplication.yml
.Find
VALTIMO_JWT_SECRET
Find all occurrences of
VALTIMO_JWT_SECRET
and rename them toVALTIMO_OAUTH_PUBLIC_KEY
. This environment variable can potentially be found in many different places such as:.env.properties
file inside the repositoryAWS Parameter store
Kubernetes
.yaml
file
Rename application property valtimo.jwt.tokenValidityInSeconds
Scope: back-end
Find valtimo.jwt.tokenValidityInSeconds
Find all occurrences of
valtimo.jwt.tokenValidityInSeconds
and rename them all tovaltimo.oauth.tokenValidityInSeconds
. This property is usually found in theapplication.yml
.Find
VALTIMO_JWT_TOKEN_VALIDITY_IN_SECONDS
Find all occurrences of
VALTIMO_JWT_TOKEN_VALIDITY_IN_SECONDS
and rename them toVALTIMO_OAUTH_TOKEN_VALIDITY_IN_SECONDS
. This environment variable can potentially be found in many different places such as:.env.properties
file inside the repositoryAWS Parameter store
Kubernetes
.yaml
file
Whitelist all services used in Camunda processes
Scope: back-end
Find all services used in processes and decision tables
Open all BPMN and DMN files and list all the services and other java/kotlin classes that are used.
Find all services in code
All the listed services must then be found inside the java/kotlin code.
Whitelist the service
Whitelisting a service should be done in one of two different ways:
Either, add
@ProcessBean
above the class. For example:Or add
@ProcessBean
above the bean definition. For example:
Remove the use of authority and contexts entities
Scope: back-end
Find and delete the use of authority classes as they are no longer supported
AuthorityResource.java
AuthorityService.java
AuthorityRepository.java
AuthorityCreatedEvent.java
AuthorityDeletedEvent.java
AuthorityEvent.java
AuthorityNameChangedEvent.java
Authority.java
AuthorityRequest.java
Money.java
Find and delete the use of context classes as they are no longer supported
ContextResource.java
ContextService.java
ContextRepository.java
UserContextRepository.java
UserContextDTO.java
Context.java
ContextProcess.java
MenuItem.java
UserContext.java
Angular and dependency upgrades
Scope: front-end
Upgrading Angular
The Valtimo front-end libraries have been upgraded from Angular 14 to Angular 16 in major 11. In order to use them, your implementation also needs to upgrade to Angular 16.
Follow this guide to upgrade from Angular 14 to Angular 15. You will probably need to use
ng update
commands with the--force
option at the end.After the migration is complete, commit your changes.
Follow this guide to upgrade from Angular 15 to Angular 16. You will probably need to use
ng update
commands with the--force
option at the end.After the migration is complete, commit your changes.
Verify whether all Angular related dependencies in the
package.json
in the root of your project are at version 16. If some have been skipped, check https://www.npmjs.com/ for their latest version and upgrade them manually.
Removing dependencies
Some dependencies have been removed from the Valtimo front-end libraries. It is advised to remove them from your implementation as well.
@angular/flex-layout
has been deprecated. Remove it from your implementation. To replace its directives, we advise to write regular CSS classes with flexbox styling.If your implementation does not use any
@angular/material
related dependencies, and they are included in yourpackage.json
dependencies, we advise to remove them.
Locking dependencies
In Valtimo front-end libraries, all dependencies not related to Angular have been locked to specific versions, in order to avoid issues which are frequently encountered with automatic minor or patch dependency upgrades.
We advise you to do the same; lock all dependencies except for the ones related to Angular. You can achieve this by removing tilde
~
and caret^
symbols from your implementation'spackage.json
.Next, we advise you to lock your dependencies to the same versions used in the Valtimo front-end libraries. A non-exhaustive list of dependencies and their versions is included below. If you cannot find your dependency in the list below, refer to the major 11 front-end libraries
package.json
here.
package.json
Adding dependencies
@valtimo/access-control
, should be added to your implementation as it is a required dependency.
Changing typescript config
In
tsconfig.json
in the root of your implementation, changemodule
toes2020
and also changees****
in thelib
array toes2020
.
Change in Carbon Design System version
Scope: front-end
Install new Carbon Dependencies
Delete node_modules.
Run 'npm install --legacy-peer-deps'.
Update all carbon selectors from 'ibm' to 'cds'
Tags
:Directives
:Classes
:Remove all usages of @carbon/icons-angular
Icon
:Registering @carbon/icons
In order to use @carbon/icons, the IconModule needs to be imported.
sample.module.ts
Some icons may not be available by default, so they need to be registered in the component where they are needed. This is accomplished via the Carbon IconService
sample.component.ts
All icons available through the Carbon library can be found here
Remove deleted admin menu items
Scope: front-end
Remove @valtimo/context
Remove
@valtimo/context
library from thepackage.json
.Remove
ContextModule
module from theapp.module.ts
.
Remove @valtimo/management
Remove
@valtimo/management
library from thepackage.json
.Remove
ManagementContextModule
module from theapp.module.ts
.Remove the
Contexts
link from theenvironment.ts
Remove @valtimo/user-management
Remove
@valtimo/user-management
library from thepackage.json
.Remove
UserManagementModule
module from theapp.module.ts
.Remove the
Users
link from theenvironment.ts
Remove @valtimo/authority
Remove
@valtimo/authority
library from thepackage.json
.Remove
AuthorityModule
module from theapp.module.ts
.Remove the
Entitlements
link from theenvironment.ts
Form-links page
Scope: front-end
environment.ts
Go to the environment.ts file and change this line:
{link: ['/form-links'], title: 'Form links'...
To this line:
{link: ['/process-links'], title: 'Process links'...
Update connector and plugin keys
Scope: back-end/front-end
In order for keys to be encrypted with GCM (as apposed to ECB, see here for more information), all existing plugin configurations need to be updated.
Save existing connector configurations with their keys
Save plugin configurations with their keys
See if encryption is used anywhere else in the application
Removal of @valtimo/user-interface library
Scope: front-end
Remove @valtimo/user-interface as a dependency
The library
@valtimo/user-interface
has been removed. All of its components, directives and services have been been moved to@valtimo/components
. In order to migrate, remove@valtimo/user-interface
as a dependency in your implementation.Change stylesheet in
angular.json
The
angular.json
file in the root of your implementation includes the following value:"node_modules/@valtimo/user-interface/assets/design-tokens.css"
This should be changed to:
"node_modules/@valtimo/components/assets/css/design-tokens.css"
Change imports
Most components, services and directives from
@valtimo/user-interface
are now exported from@valtimo/components
. Search your implementations for any imports and change them accordingly.Renamed components
The component
v-multi-input
has been renamed tovaltimo-carbon-multi-input
. If it is used anywhere in your implementation, change the selector.ModaleModule
exported from@valtimo/user-interface
is renamed toVModalModule
.CardModule
exported from@valtimo/user-interface
is renamed toVCardModule
.Update of CarbonTable for backwards compatibility
Scope: front-end
Updates in the @Input fields:
@Input paginationConfig -> @Input paginatorConfig
@Input fields has been added instead of having the columnConfigs in the tableConfig. ColumnConfig now extends the ListField for backwards compatibility.
Remove fields property from any instances of CarbonTableConfig as it is no longer a part of the interface
Enable the JSON PBAC editor
Scope: front-end
Change in
angular.json
Go to the file
angular.json
.Locate the array with assets:
projects.architect.build.options.assets
.Add the
monaco-editor
:
Add PBAC dependencies and menu items
Scope: front-end
Add PBAC dependencies
Run
npm i @valtimo/access-control@11.0.0 @valtimo/access-control-management@11.0.0
in the root of your implementation.AppModule
Add the following line to the top of
app.module.ts
:import {AccessControlManagementModule} from '@valtimo/access-control-management';
Next, add
AccessControlManagementModule
to theimports
array ofAppModule
.Access control management menu item
Add the following to the admin menu items in your environment config:
{link: ['/access-control'], title: 'Access Control', sequence: UNIQUE_SEQUENCE_NUMBER}
Make sure to update
UNIQUE_SEQUENCE_NUMBER
with a unique sequence number.Moved Verzoek plugin property
objectManagementId
Scope: back-end
Locate any .pluginconfig.json file
Go to the
/resource
folder of you project and locate any file ending with.pluginconfig.json
.Find the
verzoek
plugin configurationsEvery
.pluginconfig.json
can contain Verzoek plugin configuration. This plugin can be recognized where the propertypluginDefinitionKey
isverzoek
.Move the
objectManagementId
Every Verzoek plugin configuration has a field called
objectManagementId
. This field should be moved out of theproperties
field and into everyverzoekProperties
field.
Configure access control roles and permissions
Scope: back-end
Roles and permissions need to be configured as described here.
Last updated