Author: Filip Hrisafov
The road to Spring Boot 2.0 and our overhauled starters began during our hackathon in Valencia. Together with Spring core committers, we have provided auto-configuration support from the very first release of Spring Boot. The first commit for the initial support was actually done on 31st of May 2014 (just 2 months after the first release of Spring Boot 1.0) by Joram Barrez and Josh Long. With the Flowable 6.3.0 release we are happy to introduce support for the latest Spring Boot 2.0 (1 month after its release) in the Flowable starters. Apart from updating to the latest Spring Boot version, we have done a complete overhaul and now provide auto-configuration for all of our engines (Process, CMMN, DMN, Form, Content and IDM) and their respective APIs.
We did some restructuring in the starter modules. There are new starters that can be used:
flowable-spring-boot-starter-(-rest)– Pulls in the dependencies for all the engines (Process, CMMN, DMN, IDM, Form and Content). If
-restis used then the respective rest modules are also pulled
flowable-spring-boot-starter-process(-rest)– renamed from
For the Process, CMMN and DMN engines there are standalone starters. However, it is still possible to combine engines by pulling the appropriate modules. If you only need the auto-configuration classes you can use
We added and moved some properties to new groups (see more in our documentation).
There is also a new Info contributor that displays the version of Flowable.
Support has been added for auto-configuring
Flowable REST Security
In previous versions, the auto-configuration for the Flowable REST APIs was triggering an auto-configuration of the Spring Security
HttpSecurity. This is not the case anymore and users have to configure this themselves. Now, Flowable auto-configures (if there are none configured) only an
AuthenticationProvider and a
UserDetailsService that use the Flowable IDM Engine. If you have multiple providers and you still want to use the Flowable beans, you would have to define them yourself.
Flowable UI Apps
The Flowable UI Apps now completely consume our starters and have been migrated to Spring Boot 2.0. The benefit of this is that by using our own starters we make them more stable for our users. In order to support smooth migration the apps contain the
spring-boot-properties-migrator module. Please update all your properties to the new ones, as this dependency will be removed in the next release, Flowable 6.4.0.
Spring Boot provides an out of the box auto-configuration for Liquibase, which is triggered when Liquibase is present on the classpath. As some of the Flowable engines use Liquibase to perform the DB updates, the Spring Boot auto-configuration would always kick in. However, if users are not using it the application won’t be able to start. Therefore, using an
EnvironmentPostProcessor we disable the Spring Boot Liquibase auto-configuration by setting
false. This only happens if the user has not set this property. If you need this support you have to set it to
true explicitly in your configuration.
Spring Boot 1.5 Support
Apart from Spring Boot 2.0, we also partially support 1.5. The Spring Boot Actuator infrastructure has been redone in Spring Boot 2.0 and it was not possible for us to support both at the same time. Therefore, when using Spring Boot 1.5 the Flowable Actuator Endpoints won’t be enabled, however all other functionality (engines as Spring bean, services, etc.) work as before.
Our banner is by default added to all of our UI Apps. If you want to use it as well, just use
classpath:/org/flowable/spring/boot/flowable-banner.txt for the banner location.
How to use Flowable with Spring Boot
First, you need to create a sample project. You can do this by going to “second best place after production”, https://start.spring.io/ and pick your own group, artifact and select the dependencies you need (Web, Actuator). Once you have the project created add the following dependencies to it:
<dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter-rest</artifactId> <version>6.3.0</version> </dependency>
We are using an embedded h2 database just for demo purposes, you can use whichever database you want.
The flowable starter will configure the 6 engines (Process, CMMN, DMN, IDM, Form and Content) and will expose their REST APIs:
/process-apifor the Process Engine REST endpoints
/cmmn-apifor the Case Engine REST endpoints
/dmn-apifor the Decision Engine REST endpoints
/idm-apifor the Identity Management Engine REST endpoints
/form-apifor the Form Engine REST endpoints
/content-apifor the Content Engine REST endpoints
You can also add some processes in the
processes folder (for example the Vacation Request from our example repo), some cases in the
cases folder (for example the One Task Model from our example repo) and forms in the
forms folder (for example the ones from our example repo).
Once you start the application you can see the deployed process definitions at localhost:8080/process-api/repository/process-definitions/, the deployed case definitions at localhost:8080/cmmn-api/cmmn-repository/case-definitions/ and the deployed form definitions at localhost:8080/form-api/form-repository/form-definitions. You can also go to localhost:8080/actuator/flowable where you will get consolidated information for the process engine.
You can have a look at the full example here.
For more details on how to use the Flowable Spring Boot starters, see our documentation.