Database Configuration
1. Overview
The Provision Portal uses external relational databases to store application data and manage internal workflow engine state. Supported database systems include MySQL-compatible databases and Oracle SQL, provided that the appropriate JDBC driver is included in the project dependencies. The application does not create these databases; it relies on existing instances configured and maintained externally by ACS or manually via Liquibase.
Spring Boot configuration properties are used to define separate data sources for application-level persistence and for the Flowable process engine. These are automatically recognized by Spring and Flowable without requiring additional setup.
The default database is minimal and contains only two application-specific tables:
-
prov— storing information about provision; -
status— storing information about execution status.
It is not designed as a per-service database and may be shared with other systems or external applications that require access to the Provision Portal’s data.
2. Configuration
Provision Portal now ships two dedicated Spring profiles: application-mysql.yml and application-oracle.yml.
Select the profile through SPRING_PROFILES_ACTIVE (or spring.profiles.active) and Spring Boot will load one of the following configurations.
-
default— business data stored in the ACS schema (provision/status tables). -
flowable— Flowable engine metadata (deployments, jobs, runtime data).
Both profiles inherit the same HTTP/HTTPS settings and reuse the shared pool properties.
2.1. Default (ACS) datasource excerpt
spring:
datasource:
default:
jdbcUrl: ${MYSQL_JDBC_URL:jdbc:mysql://${MYSQL_HOST:${DB_HOST:localhost}}:${MYSQL_PORT:3306}/${MYSQL_SCHEMA:ftacs}?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=${DB_TIMEZONE:Europe/Kiev}}
username: ${MYSQL_USER:ftacs}
password: ${MYSQL_PASSWORD:ftacs}
driver-class-name: ${MYSQL_DRIVER_CLASS_NAME:com.mysql.cj.jdbc.Driver}
maximum-pool-size: ${DB_MAX_POOL_SIZE:10}
minimum-idle: ${DB_MIN_IDLE:5}
connection-timeout: ${DB_CONNECTION_TIMEOUT_MS:30000}
spring:
datasource:
default:
jdbcUrl: ${ORACLE_JDBC_URL:jdbc:oracle:thin:@//${ORACLE_HOST:${DB_HOST:localhost}}:${ORACLE_PORT:1521}/${ORACLE_SERVICE:XEPDB1}}
username: ${ORACLE_USER:ftacs}
password: ${ORACLE_PASSWORD:ftacs}
driver-class-name: ${ORACLE_DRIVER_CLASS_NAME:oracle.jdbc.OracleDriver}
2.2. Flowable datasource excerpt
spring:
datasource:
flowable:
jdbcUrl: ${FLOWABLE_MYSQL_JDBC_URL:jdbc:mysql://${FLOWABLE_MYSQL_HOST:${FLOWABLE_DB_HOST:${DB_HOST:localhost}}}:${FLOWABLE_MYSQL_PORT:${MYSQL_PORT:3306}}/${FLOWABLE_MYSQL_SCHEMA:flowable}?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=${DB_TIMEZONE:Europe/Kiev}}
username: ${FLOWABLE_MYSQL_USER:flowable}
password: ${FLOWABLE_MYSQL_PASSWORD:flowable}
driver-class-name: ${FLOWABLE_MYSQL_DRIVER_CLASS_NAME:com.mysql.cj.jdbc.Driver}
maximum-pool-size: ${FLOWABLE_DB_MAX_POOL_SIZE:${DB_MAX_POOL_SIZE:10}}
minimum-idle: ${FLOWABLE_DB_MIN_IDLE:${DB_MIN_IDLE:5}}
connection-timeout: ${FLOWABLE_DB_CONNECTION_TIMEOUT_MS:${DB_CONNECTION_TIMEOUT_MS:30000}}
Oracle values mirror these placeholders using the FLOWABLE_ORACLE_* variables.
Set FLOWABLE_DB_HOST when the Flowable schema lives on a different server than the ACS schema.
2.3. Environment Variables
2.3.1. Shared pool settings
| Variable | Description |
|---|---|
|
Upper bound for the ACS datasource pool. Default |
|
Minimum warm connections in the ACS pool. Default |
|
How long to wait for a connection before failing a request. Default |
|
Flowable-specific overrides. Inherit the shared values when unset. |
|
Fallback hostnames used by the profile-specific variables. |
|
Database server timezone used in the MySQL JDBC connection string ( |
2.3.2. MySQL profile
| Variable | Description |
|---|---|
|
Full JDBC override. Leave empty to synthesize a URL from host/port/schema. |
|
Server address for the ACS schema. Defaults to |
|
Schema (database) name that stores |
|
Credentials for the ACS datasource. Defaults |
|
Driver class. Keep |
2.3.3. Oracle profile
| Variable | Description |
|---|---|
|
Full JDBC override ( |
|
Listener endpoint. Defaults to |
|
Service name or SID that exposes the ACS schema. Default |
|
Credentials for the ACS schema. Defaults to |
|
Driver class ( |
2.3.4. Flowable (MySQL)
Use the same pattern to point Flowable to another server or schema.
| Variable | Description |
|---|---|
|
Override for the Flowable JDBC string. |
|
Components for the Flowable schema. Defaults to |
|
Flowable credentials. Default |
|
Driver class for Flowable when using MySQL ( |
2.3.5. Flowable (Oracle)
| Variable | Description |
|---|---|
|
Complete Oracle JDBC string override. |
|
Oracle listener/service for the Flowable schema. |
|
Credentials for Flowable tables. |
|
Driver class for Flowable when using Oracle ( |
See the Installation Guide for detailed Oracle setup instructions, including the Flowable schema requirements.
3. Defining DataSource Beans
A @Configuration class defines beans for each configured data source using HikariCP.
Each bean is associated with its corresponding property prefix:
Unresolved include directive in modules/ROOT/pages/database.adoc - include::../../src/main/java/com/friendly/provisionportal/config/DatabaseConfig.java[]
-
The
mainDataSourcebean is configured with properties underspring.datasource.default.*. -
The
flowableDataSourcebean is configured withspring.datasource.flowable.*and marked with@Primaryto be the default within the Flowable context.