cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Synchronization Error with timer boundary events

muralidharand
Star Contributor
Star Contributor
Hi Experts,
I created a custom workflow using Eclipse activiti designer. In the workflow we wanted to send some remainder emails based on the due date which is assigned in the task. To send the remainder emails, we have used JAVA delegates.

All are fine in the development environment and in the test environment. When we deploy the same in the QA environment only the remainder emails are not triggering. Configuration wise, the test environment and QA environment are same.
When I looked at the alfresco.log file, the following error is logged in the QA environment.

06:07:42,284 ERROR [org.springframework.transaction.support.TransactionSynchronizationUtils] TransactionSynchronization.afterCompletion threw exception
java.lang.IllegalStateException: No value for key [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@6c822e6c] bound to thread [pool-5-thread-3]
   at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:199)
   at org.mybatis.spring.SqlSessionUtils$SqlSessionSynchronization.suspend(SqlSessionUtils.java:243)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.doSuspendSynchronization(AbstractPlatformTransactionManager.java:666)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.suspend(AbstractPlatformTransactionManager.java:569)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:418)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:347)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.jobexecutor.DecrementJobRetriesListener.execute(DecrementJobRetriesListener.java:38)
   at org.activiti.spring.SpringTransactionContext$4.afterCompletion(SpringTransactionContext.java:82)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:996)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:971)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:874)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:822)
   at org.springframework.transaction.support.TransactionTemplate.rollbackOnException(TransactionTemplate.java:161)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:134)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:36)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

 <boundaryEvent id="boundarytimer4" name="Timer" attachedToRef="sid-A9FA5F1E-66A8-4E7B-A6AF-A8105A56BDD4" cancelActivity="false">      <timerEventDefinition>        <timeDuration>R/PT2H</timeDuration>      </timerEventDefinition>    </boundaryEvent>‍‍‍‍‍‍‍‍


The above snippet says, execute the task for every two hours. We have hooked up the java delegate here to send the remainder emails.



Can someone throw some lights on this?
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
How are you sure it's the timer boundary causing this?

I assume this is in Alfresco. Is the delegate executed with the correct user in Alfresco (don't know the exact Alfresco terminology here)?