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
相关推荐
桦说编程5 小时前
深入解析CompletableFuture源码实现(2)———双源输入
java·后端·源码
舒一笑5 小时前
大模型时代的程序员成长悖论:如何在AI辅助下不失去竞争力
后端·程序员·掘金技术征文
lang201509285 小时前
Spring Boot优雅关闭全解析
java·spring boot·后端
言德斐5 小时前
SQL性能优化的思路及策略
数据库·sql·性能优化
码界奇点5 小时前
Django视图从基础到高级的全面解析
数据库·django·sqlite·web·python3.11
Allan_20255 小时前
数据库学习
数据库·学习
fen_fen6 小时前
人大金仓数据库kingbase8创建表示例
数据库·oracle
一勺菠萝丶6 小时前
「您的连接不是私密连接」详解:为什么 HTTPS 证书会报错,以及如何正确配置子域名证书
数据库·网络协议·https
小羊在睡觉6 小时前
golang定时器
开发语言·后端·golang
用户21411832636026 小时前
手把手教你在魔搭跑通 DeepSeek-OCR!光学压缩 + MoE 解码,97% 精度还省 10-20 倍 token
后端