AnsweredAssumed Answered

activiti: task owner is deleted user

Question asked by dirko on Mar 13, 2013
Latest reply on Apr 8, 2013 by dirko
Hello,

I have the requirement that I need to periodically check whether the owner of a task is still a valid alfresco user. The approach I was looking at is the following:

- attach a timer to the task to be monitored
- the timer redirects to a serviceTask in which I test with a search.luceneSearch() whether the user still exists in alfresco

Now, the weird thing I observe is that the user that I delete (to be able to test this functionality) is recreated after this periodic task. My current (wild) guess is the the activiti machinery is somewhere calling personService.getPerson(deletedUser), which recreates this user.

When I set "<property name="createMissingPeople">false</property>" in authentication-services-context.xml to avoid this recreation of the deleted user, I obtain a transaction rollback (log below) and the workflow is stuck in the monitored task.

I know this is all rather vague, but I would be happy if someone could provide me with a hint on how to further investigate this or tell me whether there is a better approach to handling abandoned tasks.

dirk


13:49:23,245 ERROR [org.springframework.transaction.support.TransactionSynchronizationUtils] TransactionSynchronization.afterCompletion threw exception
java.lang.IllegalStateException: No value for key [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@1003cac6] bound to thread [pool-9-thread-1]
        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)

Outcomes