cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a process-loop results in an error

goekan-t
Champ in-the-making
Champ in-the-making
Hey,

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(DefaultSqlSession.java:42)
   at org.activiti.engine.impl.db.DbSqlSession.selectOne(DbSqlSession.java:175)
   at org.activiti.engine.impl.db.DbHistorySession.findHistoricActivityInstance(DbHistorySession.java:76)
   at org.activiti.engine.impl.history.HistoricFormPropertyEntity.<init>(HistoricFormPropertyEntity.java:45)
   at org.activiti.engine.impl.cmd.SubmitTaskFormCmd.execute(SubmitTaskFormCmd.java:63)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:37)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   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.FormServiceImpl.submitTaskFormData(FormServiceImpl.java:64)

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?
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Hi,

This issue is fixed, and will be available in the 5.3 release: http://jira.codehaus.org/browse/ACT-621

Cheers,

goekan-t
Champ in-the-making
Champ in-the-making
Thanks for the quick reply!
Is it possible to get a ReleaseCandidate or a Milestone-Version of 5.3?

frederikherema1
Star Contributor
Star Contributor
Hi,

You can always build the activiti-jars from the source on trunk (5.3-SNAPSHOT) yourself, we do not upload snapshots anywhere.

http://docs.codehaus.org/display/ACT/Developers+Guide#DevelopersGuide-SourceCode

Running mvn -Pcheck clean install will install jar's in you local maven repo, you can use those