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_dropCreates 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-failIgnores 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)

SettingValueMeaning
database-schema-updatetrueAuto-create/update tables
db-history-usedtrueEnable history tables
history-levelfullSave full execution history
check-process-definitionsfalseDon’t auto-load BPMN files
deployment-modenever-failAvoid deployment errors on startup
async-executor-activatefalseDon’t start async job processor
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值