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
相关推荐
深鱼~30 分钟前
DbGate数据库管理新方案:cpolar打造跨平台远程访问通道
数据库
计算机毕业设计指导33 分钟前
基于Spring Boot + Vue 3的社区养老系统设计与实现
vue.js·spring boot·后端
拾忆,想起33 分钟前
Redisson 分布式锁的实现原理
java·开发语言·分布式·后端·性能优化·wpf
几颗流星35 分钟前
Rust 常用语法速记 - 解构赋值
后端·rust
我想当数字游民39 分钟前
Go的切片是什么?一些小细节和容易错的地方
后端·golang
肖焱41 分钟前
Java中的集合类有哪些?如何分类的?
后端
野生程序员y43 分钟前
Spring DI/IOC核心原理详解
java·后端·spring
WAWA战士1 小时前
mysql总结
数据库
熊思宇1 小时前
Sqlite“无法加载 DLL“e_sqlite3”: 找不到指定的模块”解决方法
数据库·sqlite
往事随风去1 小时前
面试官:mysql从数据库断开一段时间后,部分binlog已丢失,如何重建主从?
运维·数据库·mysql