Backend Development 15 min read

Comprehensive Guide to Deploying Flowable UI and Building a Spring Boot Workflow Backend

This article provides a step‑by‑step tutorial on installing Flowable‑UI, designing BPMN diagrams, setting up a Spring Boot backend project, configuring the database tables, and using Flowable engine APIs with complete code examples and deployment instructions.

Java Architect Essentials
Java Architect Essentials
Java Architect Essentials
Comprehensive Guide to Deploying Flowable UI and Building a Spring Boot Workflow Backend

Overview

The article introduces how to use Flowable’s built‑in UI to create workflow diagrams and how to develop the corresponding backend services with Spring Boot.

1. Flowable‑UI Deployment and Running

Download flowable-6.6.0.zip from the official site, extract flowable-ui.war , and deploy it to Tomcat. Access the UI at http://localhost:8080/flowable-ui using the default credentials admin/test . Configure the database connection in flowable-default.properties and copy the MySQL driver JAR to the flowable-rest lib directory.

2. Drawing the Process Diagram

Use the APP.MODELER in Flowable‑UI to design the workflow, which includes events, sequence flows, gateways, and user tasks. The article explains each element and shows how the process flows from a start event through student, teacher, and principal tasks, ending at the end event.

Diagram Details

Keep the process model.

Set conditions on sequence flows to control gateway decisions.

Assign tasks to candidate groups or users.

Export the BPMN file after design.

3. Backend Project Setup

The backend is built with JDK 8 and Spring Boot 2.3.0. The essential Maven dependencies are:

<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-spring-boot-starter</artifactId>
  <version>6.6.0</version>
</dependency>
<dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>5.1.45</version>
</dependency>

Application configuration (application.yml) sets the MySQL datasource URL, driver class, username, and password.

4. Database Tables

Flowable uses a set of tables prefixed with ACT_ . They are grouped as:

Repository tables (ACT_RE_) : store static definitions and deployments.

Runtime tables (ACT_RU_) : hold active process instances, tasks, variables, and jobs.

History tables (ACT_HI_) : keep completed instances and audit data.

Identity tables (ACT_ID_) : manage users and groups.

General tables (ACT_GE_) : binary data and properties.

5. Engine API and Services

The main services are:

RepositoryService – deploy and manage process definitions.

RuntimeService – start process instances.

IdentityService – manage users and groups.

TaskService – query, claim, and complete user tasks.

HistoryService – query completed instances and tasks.

Code Example

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.*;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.runtime.Execution;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.idm.api.Group;
import org.flowable.idm.api.User;
import org.flowable.task.api.Task;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipInputStream;

@Slf4j
public class TestFlowable {
    @Autowired private RepositoryService repositoryService;
    @Autowired private RuntimeService runtimeService;
    @Autowired private HistoryService historyService;
    @Autowired private org.flowable.engine.TaskService taskService;
    @Autowired private org.flowable.engine.IdentityService identityService;

    public void createDeploymentZip() {
        try {
            File zipTemp = new File("f:/leave_approval.bpmn20.zip");
            ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(zipTemp));
            Deployment deployment = repositoryService.createDeployment()
                .addZipInputStream(zipInputStream)
                .deploy();
            log.info("部署成功:{}", deployment.getId());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        // query definitions, start process, claim/complete tasks, query history ...
    }
}

The code demonstrates deployment of a zipped BPMN file, querying process definitions, starting an instance, claiming and completing tasks for student and teacher groups, and finally retrieving historic process and task data.

Conclusion

The guide walks through the entire lifecycle of a Flowable workflow—from UI modeling to backend implementation, database schema, and API usage—providing a practical reference for developers building Java‑based workflow solutions.

JavaDatabaseworkflowBackend developmentBPMNSpring BootFlowable
Java Architect Essentials
Written by

Java Architect Essentials

Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.