AnsweredAssumed Answered

Creating a process-loop results in an error

Question asked by goekan-t on Feb 17, 2011
Latest reply on Feb 17, 2011 by frederikheremans1

the creation of loops in processes was already argued. But i have difficulties in implementing it:
When i complete the user-task the first time in the loop everything is alright.
When i try to complete it the second time i get an error like this:

Caused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(
   at org.activiti.engine.impl.db.DbSqlSession.selectOne(
   at org.activiti.engine.impl.db.DbHistorySession.findHistoricActivityInstance(
   at org.activiti.engine.impl.history.HistoricFormPropertyEntity.<init>(
   at org.activiti.engine.impl.cmd.SubmitTaskFormCmd.execute(
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(
   at org.activiti.spring.SpringTransactionInterceptor.execute(
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(
   at org.activiti.engine.impl.FormServiceImpl.submitTaskFormData(

The problem is, that there are two entries for the same activityId and processInstanceId in the history-table.
But the activiti-engine expects one entry.

So how can i solve this problem?