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:

  1. prov — storing information about provision;

  2. 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

application-mysql.yml
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}
application-oracle.yml
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

DB_MAX_POOL_SIZE

Upper bound for the ACS datasource pool. Default 10.

DB_MIN_IDLE

Minimum warm connections in the ACS pool. Default 5.

DB_CONNECTION_TIMEOUT_MS

How long to wait for a connection before failing a request. Default 30000 ms.

FLOWABLE_DB_MAX_POOL_SIZE, FLOWABLE_DB_MIN_IDLE, FLOWABLE_DB_CONNECTION_TIMEOUT_MS

Flowable-specific overrides. Inherit the shared values when unset.

DB_HOST, FLOWABLE_DB_HOST

Fallback hostnames used by the profile-specific variables.

DB_TIMEZONE

Database server timezone used in the MySQL JDBC connection string (serverTimezone parameter). Default Europe/Kiev.

2.3.2. MySQL profile

Variable Description

MYSQL_JDBC_URL

Full JDBC override. Leave empty to synthesize a URL from host/port/schema.

MYSQL_HOST, MYSQL_PORT

Server address for the ACS schema. Defaults to DB_HOST/3306.

MYSQL_SCHEMA

Schema (database) name that stores prov and status. Default ftacs.

MYSQL_USER, MYSQL_PASSWORD

Credentials for the ACS datasource. Defaults ftacs/ftacs.

MYSQL_DRIVER_CLASS_NAME

Driver class. Keep com.mysql.cj.jdbc.Driver for MySQL-compatible engines.

2.3.3. Oracle profile

Variable Description

ORACLE_JDBC_URL

Full JDBC override (jdbc:oracle:thin:@//…​). Overrides host/port/service.

ORACLE_HOST, ORACLE_PORT

Listener endpoint. Defaults to DB_HOST/1521.

ORACLE_SERVICE

Service name or SID that exposes the ACS schema. Default XEPDB1.

ORACLE_USER, ORACLE_PASSWORD

Credentials for the ACS schema. Defaults to ftacs.

ORACLE_DRIVER_CLASS_NAME

Driver class (oracle.jdbc.OracleDriver).

2.3.4. Flowable (MySQL)

Use the same pattern to point Flowable to another server or schema.

Variable Description

FLOWABLE_MYSQL_JDBC_URL

Override for the Flowable JDBC string.

FLOWABLE_MYSQL_HOST, FLOWABLE_MYSQL_PORT, FLOWABLE_MYSQL_SCHEMA

Components for the Flowable schema. Defaults to FLOWABLE_DB_HOST, 3306, flowable.

FLOWABLE_MYSQL_USER, FLOWABLE_MYSQL_PASSWORD

Flowable credentials. Default flowable/flowable.

FLOWABLE_MYSQL_DRIVER_CLASS_NAME

Driver class for Flowable when using MySQL (com.mysql.cj.jdbc.Driver).

2.3.5. Flowable (Oracle)

Variable Description

FLOWABLE_ORACLE_JDBC_URL

Complete Oracle JDBC string override.

FLOWABLE_ORACLE_HOST, FLOWABLE_ORACLE_PORT, FLOWABLE_ORACLE_SERVICE

Oracle listener/service for the Flowable schema.

FLOWABLE_ORACLE_USER, FLOWABLE_ORACLE_PASSWORD

Credentials for Flowable tables.

FLOWABLE_ORACLE_DRIVER_CLASS_NAME

Driver class for Flowable when using Oracle (oracle.jdbc.OracleDriver).

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 mainDataSource bean is configured with properties under spring.datasource.default.*.

  • The flowableDataSource bean is configured with spring.datasource.flowable.* and marked with @Primary to be the default within the Flowable context.