JBoss Community

Thread Pool - JBPM 5.3

created by edsdev in jBPM Development - View the full discussion

I am evaluating jbpm for workflow management in a simple java container.  One of the issues I am having trouble researching is multi threading.  When I kick off 100 workflows in my test script.  They are all handled on one thread "pool-1-thread-1".  I was assuming that I could set a max thread on the session or something similar to allow these workflows to be processed using multiple threads.  Here are my attempts.  Please help with any other feedback.

 

1.  I read about jbpm.cfg.xml and including jbpm.jobexecutor.cfg.xml on a 4.x discussion.  I cannot find this documentation for 5.3 and when I place these files in my classpath, It does not seem to be picked up.  Can this be used?

jbpm.cfg.xml

 

 

jbpm.jobexecutor.cfg.xml

 

<process-engine-context>    
    <job-executor threads="4" idle="15000" idle-max="60000" lock-millis="3600000" />  
</process-engine-context>

 

2.  Create a StatefullKnowledgeSession for each thread that I want and distribute the processes on each session.  -  I am able to get this to work, just is a lot of management on my part and if you want the thread to end (usually in my test cases), you have to dispose of the session, but only after all jobs are finished executing, which is again a lot more code clutter that I would suspect you should not have to write.

 

Thanks for your time, Ed

 

<?xml version="1.0" encoding="UTF-8"?>  
  <jbpm-configuration>  
    <import xresource="jbpm.jobexecutor.cfg.xml" />  
  </jbpm-configuration>

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community