AnsweredAssumed Answered

activiti: task owner is deleted user

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

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.


13:49:23,245 ERROR [] 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.mybatis.spring.SqlSessionUtils$SqlSessionSynchronization.suspend(
        at org.activiti.spring.SpringTransactionInterceptor.execute(
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(
        at org.activiti.engine.impl.jobexecutor.DecrementJobRetriesListener.execute(
        at org.activiti.spring.SpringTransactionContext$4.afterCompletion(