JBoss Community

Re: Using Jbpm 5 in a commercial project

created by nash kom in jBPM - View the full discussion

Hi Mauricio,

 

Thank you for your quick reply, we are tarting to contact sales people.

 

sorry for the late reply, I was trying to simplify my process model to identify the source of the issue:

 

here are the details :

 

the process

http://community.jboss.org/servlet/JiveServlet/downloadImage/2-639537-17412/450-150/process.jpeg

when I try  to access the process instance information Change Level workItemHandler:

 

public class ChangeLevelWorkItemHandler implements WorkItemHandler {

public void executeWorkItem(WorkItem workItem, WorkItemManager workItemManager) {

System.out.println(" Changing the level = " + workItem.getParameter("direction"));

ProcessManager.getProcessInstance(workItem.getProcessInstanceId());

 

in the processManager :

 

public static ProcessInstance getProcessInstance(

long processInstanceId) {

return ksession.getProcessInstance(processInstanceId);

}

 

 

 

I'm using a persisted ksession that I create exactly like in the jbpm console :

 

env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);

Properties properties = new Properties();

properties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");

properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");

KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);

try {

…..

the process is executed correctly, but after the transaction time out, there is a roll-back(ransactionReaper::check timeout …. Abort of action id 7f000101:e18b:4ed4a5a4:10b invoked while multiple threads active within it. ).

 

I activated hibernate sql logs, I can see the sql request to create the process, but not those to insert the workiteminfo and delete them after the end.

 

Every thing work correctly and I can see all the sql request if :

I remove the timer or the ProcessManager.getProcessInstance(workItem.getProcessInstanceId()) line from the workItemHandler.

 

 

I will try this process in the jbpm console to see how it behave. But I don't know where to put the workitem handler.

 

Many thanks for your help

Reply to this message by going to Community

Start a new discussion in jBPM at Community