setting up Activiti BPMN Workflow Engine with Spring Boot

spring.activiti.database-schema-update: true

  • Controls how Activiti handles its database tables on startup.

  • Options:

    • true -- Default. Creates or updates tables automatically if missing. ✅ Good for development.

    • false -- Disables auto-update. Throws an error if tables are missing or version mismatch. ❌ For production.

    • create_drop -- Creates tables on start and drops them on shutdown. ⚠️ Risky, only for testing.

    • drop-create -- Drops existing tables and creates new ones every time app starts.


📚 spring.activiti.db-history-used: true

  • Enables Activiti's history tables.

  • These store past process execution info (like who approved what and when).

  • Without this, even with history-level set, no history tables are created.


🕘 spring.activiti.history-level: full

  • Defines how much history Activiti saves.

  • Options:

    • none -- No history (best performance).

    • activity -- Saves basic activity instance data.

    • audit -- Adds task info like who did what.

    • full -- Saves everything , including variables and execution details. ✅ Best for debugging/auditing.


🔍 spring.activiti.check-process-definitions: false

  • Whether to automatically scan and deploy BPMN process files from resources/processes/.

  • false -- You must manually deploy processes (e.g., via code or REST).

  • ✅ Useful when you don't want automatic redeployments (e.g., in production).


🚫 spring.activiti.deployment-mode: never-fail

  • Controls deployment conflict handling:

    • default -- May fail if process definition is already deployed.

    • single-resource -- Deploys each file separately.

    • never-fail -- Ignores duplicate deployments, avoids errors.

  • ✅ Safer option to prevent deployment exceptions during startup.


spring.activiti.async-executor-activate: false

  • Controls whether the async executor is started.

  • Async executor handles asynchronous jobs and timers in workflows.

  • false -- Disables it.

  • ✅ Disable if you don't use timers/events to avoid unnecessary thread usage.


✅ Summary (recommended for dev)

Setting Value Meaning
database-schema-update true Auto-create/update tables
db-history-used true Enable history tables
history-level full Save full execution history
check-process-definitions false Don't auto-load BPMN files
deployment-mode never-fail Avoid deployment errors on startup
async-executor-activate false Don't start async job processor
相关推荐
程序员Terry1 分钟前
Java 代理模式:从生活中的"中介"到代码中的"代理人"
后端·设计模式
野犬寒鸦1 分钟前
JVM垃圾回收机制深度解析(G1篇)(垃圾回收过程及专业名词详解)(补充)
java·服务器·开发语言·jvm·后端·面试
白宇横流学长2 分钟前
基于SpringBoot实现的信息技术知识赛系统设计与实现【源码+文档】
java·spring boot·后端
Carsene3 分钟前
AutoScan:Spring Boot 项目底座跨包扫描的终极解决方案
spring boot
yhyyht4 分钟前
Maven命令学习记录(一)
后端
2501_945423545 分钟前
如何为开源Python项目做贡献?
jvm·数据库·python
Soofjan6 分钟前
Go channel源码
后端
2401_884563247 分钟前
使用Flask快速搭建轻量级Web应用
jvm·数据库·python
清风徐来QCQ7 分钟前
Redis以及如何在springboot中使用
数据库·redis·缓存
Soofjan8 分钟前
channel
后端