Activiti / Activiti

Activiti is a light-weight workflow and Business Process Management (BPM) Platform targeted at business people, developers and system admins. Its core is a super-fast and rock-solid BPMN 2 process engine for Java. It's open-source and distributed under the Apache license. Activiti runs in any Java application, on a server, on a cluster or in the cloud. It integrates perfectly with Spring, it is extremely lightweight and based on simple concepts.
https://www.activiti.org
Apache License 2.0
10.07k stars 6.94k forks source link

Encountering "Transaction synchronization is not active" error when a timer job is executed #4512

Open vicehope opened 9 months ago

vicehope commented 9 months ago

Activiti version: 8.0.0 Spring Boot: 3

java.lang.IllegalStateException: Transaction synchronization is not active
    at org.springframework.transaction.support.TransactionSynchronizationManager.registerSynchronization(TransactionSynchronizationManager.java:277)
    at org.activiti.spring.SpringTransactionContext.addTransactionListener(SpringTransactionContext.java:79)
    at org.activiti.engine.impl.asyncexecutor.DefaultJobManager.hintAsyncExecutor(DefaultJobManager.java:428)
    at org.activiti.engine.impl.asyncexecutor.DefaultJobManager.triggerExecutorIfNeeded(DefaultJobManager.java:103)
    at org.activiti.engine.impl.asyncexecutor.DefaultJobManager.moveTimerJobToExecutableJob(DefaultJobManager.java:142)
    at org.activiti.engine.impl.asyncexecutor.AcquireTimerJobsRunnable$1.execute(AcquireTimerJobsRunnable.java:68)
    at org.activiti.engine.impl.asyncexecutor.AcquireTimerJobsRunnable$1.execute(AcquireTimerJobsRunnable.java:63)
    at org.activiti.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:41)

Could anyone advise me on the correct configuration in Spring Boot?

isuri1 commented 3 months ago

@vicehope were you able to resolve this issue?