3 Replies Latest reply on Nov 21, 2012 12:11 PM by franco80

    JBPM 5.3 many process instance in jbpm-console

    franco80 Novice

      Hello

       

      when process is creating a see in jbpm-console many instance with the same id and when I click on one of them I recived:

       

      16:29:55,126 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http-localhost-127.0.0.1-8080-5) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: javax.persistence.NonUniqueResultException: result returns more than one elements

       

      my code is :

       

                                          ut = (UserTransaction) new InitialContext()

                                          .lookup("java:comp/UserTransaction");

                                          ut.begin();

                                         

                                          StatefulKnowledgeSession session = JbpmAPIUtil.getSession();

                                          JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(session);

                 

                                          Map<String, Object> paramsOut = new HashMap<String, Object>();

                                          paramsOut.put(EProcessParams.USER_ID.getValue(), ...);

                 

                                          ProcessInstance pi = session.startProcess(

                                                                  EProcessParams.PROCESS_ID.getValue(), paramsOut);

                 

                                          Thread.sleep(3000);

                                         

                                          TaskSummary task = JbpmAPIUtil.startTask(pi.getId(), user,

                                                                  Egroup);

                                                                             

                                          Map<String, Object> params = new HashMap<String, Object>();

                                          ...

       

                                          JbpmAPIUtil.completeTask(pi.getId(), task.getId(), user,

                                                      group, nextUser,

                                                      nextGroup, params);

                                         

                                          ut.commit();

                                         

                                          logger.dispose();

       

       

      why may be couse ?

       

      regards