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
相关推荐
binbinaishijie8811 小时前
Matlab读取CSV数据并处理实战指南:从入门到精通
大数据·数据库·其他·matlab
szm022511 小时前
Mysql
数据库·mysql
DCTANT11 小时前
【原创】使用更优雅的方式改造MyBatisPlus逻辑删除插件
spring boot·后端·mysql·kotlin·mybatis·mybatisplus
上进小菜猪11 小时前
基于 YOLOv8 的太阳能电池片缺陷智能检测识别实战 [目标检测完整源码]
后端
Rysxt_11 小时前
Go语言:现代编程的效率与并发之选
开发语言·后端·golang
鸠摩智首席音效师11 小时前
MySQL ERROR 1114 (HY000): The table is full
数据库·mysql
数据大魔方11 小时前
【期货量化实战】豆粕期货量化交易策略(Python完整代码)
开发语言·数据库·python·算法·github·程序员创富
l***217811 小时前
Spring Boot 整合 log4j2 日志配置教程
spring boot·单元测试·log4j
内存不泄露12 小时前
基于 Spring Boot 的医院预约挂号系统(全端协同)设计与实现
java·vue.js·spring boot·python·flask
Mr -老鬼12 小时前
Rust 知识图-谱基础部分
开发语言·后端·rust