How to run jBPM REST API in Spring Boot

This is a quick article to discuss how to configure jBPM projects with Spring Boot to include the Swagger UI. The Swagger UI is an handy wrapper to invoke jBPM REST API.

Firstly, if you are new to jBPM REST API we recommend checking this article: jBPM REST API made simple

That being said, to enable the Swagger UI in jBPM you need two main actions:

  • Enable Swagger in the Spring Boot configuration
  • Include the relevant dependencies
  • Configure the Security to allow permissions to access the REST API

Let’s get started!

How to enable Swagger UI in Spring Boot

Firstly, enable the SwaggerUI by setting the kieserver.swagger.enabled property to true. It is also recommended to set the jbpm.executor.enabled property to true if you want to execute Jobs (such as the LogCleanUpCommand) via the REST API:


Including Swagger dependencies

The first step requires adding the following dependencies in your pom.xml:



That should be fairly simple. Then, let’s move to the next point.

Configuring the Security

Next, include in our Spring Boot project a class which extends WebSecurityConfigurerAdapter and implements the configuration methods to allow an user with “kie-server” Role:

public class DefaultWebSecurityConfig extends WebSecurityConfigurerAdapter {

    protected void configure(HttpSecurity http) throws Exception {

    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {


    CorsConfigurationSource corsConfigurationSource() {
        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
        CorsConfiguration corsConfiguration = new CorsConfiguration();
        source.registerCorsConfiguration("/**", corsConfiguration);
        return source;

    public PasswordEncoder passwordEncoder() {
        return NoOpPasswordEncoder.getInstance();

In this example code, the username “user/user” can access the REST API. Let’s test it!

Testing the REST API

Once started, you will be able to access the REST API at the following URL: http://localhost:8090/rest/api-docs?url=http://localhost:8090/rest/swagger.json#/

Here is the Swagger UI in action:

jbpm REST API Swagger


This article was a quick walk though the configuration of Swagger UI on Spring Boot to simplify the testing of the jBPM REST API.