Database
By default, Flowable Engage is configured to run with a built-in H2 database
located in a folder flowable-db
in your home directory.
On Unix or macOS this is ~/flowable-db
.
If you want to change the location of the H2 database then add the following line
(and change flowable-db
to your preference) to the application.properties
created previously in the lib
directory:
spring.datasource.url=jdbc:h2:~/flowable-db/db;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=9091;DB_CLOSE_DELAY=-1
The Flowable Engage application is a Spring Boot 2.1 application
and can be configured in the standard Spring Boot fashion.
This means that the database can be configured by setting the following
properties in the application.properties
file created previously:
spring.datasource.driver-class-name=<jdbc driver>
spring.datasource.url=<jdbc url>
spring.datasource.username=<username>
spring.datasource.password=<password>
Here are example JDBC URLs for common databases:
-
MySQL:
jdbc:mysql://localhost:3306/flowable
-
PostgreSQL:
jdbc:postgresql://localhost:5432/flowable
-
Oracle:
jdbc:oracle:thin:@localhost:1521:XE
-
MSSQL:
jdbc:sqlserver://localhost:1433;database=flowable
Flowable Engage does not ship any JDBC drivers other than one for
the H2 database.
Therefore, you will need to download the appropriate JDBC driver and copy it to the Tomcat’s lib
folder before starting Tomcat.
Example for setting up PostgreSQL
-
Download and install PostgreSQL from https://www.postgresql.org/download/.
-
Copy the JDBC driver for PostgreSQL (from https://jdbc.postgresql.org/download.html) to the
lib
directory of the Tomcat instance. -
Connect with
psql
and create a user and a database:CREATE ROLE flowable WITH LOGIN PASSWORD 'flowable'; CREATE DATABASE flowable; GRANT ALL PRIVILEGES ON DATABASE flowable TO flowable;
-
Add the JDBC URL, driver, username and password of the schema you just created to the
application.properties
file in thelib
folder of your Tomcat installation.
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/flowable
spring.datasource.username=flowable
spring.datasource.password=flowable