JBoss Community

JBPM 5.3 many process instance in jbpm-console

created by franco80 in jBPM - View the full discussion

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

Reply to this message by going to Community

Start a new discussion in jBPM at Community