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
相关推荐
学长毕业设计6 分钟前
基于SpringBoot的咖啡馆管理系统的设计与实现(源码+文档+讲解视频)
java·spring boot·后端
腾讯云开发者7 分钟前
与数据库打了几十年交道,WorkBuddy让我有了「第二知识库」
数据库
骇客野人9 分钟前
SpringBoot业财一体化系统设计和落地实施方案
java·spring boot·后端
学长毕业设计12 分钟前
基于SpringBoot的教学资源推荐系统的设计与实现(源码+文档+讲解视频)
java·spring boot·后端
星云API技术支持17 分钟前
企业微信二次开发机器人:实时消息回调与历史消息同步如何配合
数据库·机器人·企业微信
用户8508692761518 分钟前
一次线上文件上传 Bug 引发的区块链分布式存储深度排查
后端
名字还没想好☜20 分钟前
Java Cleaner 实战:替代废弃的 finalize() 做堆外资源清理,以及强引用导致永不回收的坑
java·后端·spring
Aolith29 分钟前
我在React全栈项目中搭建了一个完整题库
数据库·react.js·全栈
大勇前进32 分钟前
写了5年代码,我重新开始认真写单元测试
后端
长大198837 分钟前
TypeScript 真的是 JavaScript 的"平替"吗?5 个真实项目踩坑记录
后端