Discussion:
[jboss-user] [jBPM] - Starting Multiple Process Instances
Saju Chithran
2013-05-09 08:14:02 UTC
Permalink
Saju Chithran [https://community.jboss.org/people/sajuc] created the discussion

"Starting Multiple Process Instances"

To view the discussion, visit: https://community.jboss.org/message/816938#816938

--------------------------------------------------------------
Hi,
     I am new to jBPM. I want to start a number of process instances in bulk (anly automatic tasks involved). When I try to start, it by iterating, process execution starts only after the exection completion of previous process. Also it takes about 2sec to start each process. Could anyone throw some light into the best approch to start process in bulk and also improve th performance.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/816938#816938]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Mauricio Salatino
2013-05-09 10:05:32 UTC
Permalink
Mauricio Salatino [https://community.jboss.org/people/salaboy21] created the discussion

"Re: Starting Multiple Process Instances"

To view the discussion, visit: https://community.jboss.org/message/816955#816955

--------------------------------------------------------------
Hi,
so two things to mention:
1) it's taking 2 seconds to execute your processes from the start to end, not just to starting them
2) You have several approaches to start processes concurrently.
   a) You can have a thread pool and start one process per thread in different sessions, that shares the same kbase
    b) you can implement an async mechanism that only start the process in the main thread and then you have a pool of threads in the back that continues them .

Cheers
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/816955#816955]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Mauricio Salatino
2013-05-09 10:07:47 UTC
Permalink
Mauricio Salatino [https://community.jboss.org/people/salaboy21] created the discussion

"Re: Starting Multiple Process Instances"

To view the discussion, visit: https://community.jboss.org/message/816956#816956

--------------------------------------------------------------
If you can take a look at the Runtime Manager in jbpm (6.0) latest source code you can use it for doing that kind of things in multiple threads. Look at this test for example:

https://github.com/droolsjbpm/jbpm/blob/master/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/concurrent/SessionTest.java https://github.com/droolsjbpm/jbpm/blob/master/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/concurrent/SessionTest.java
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/816956#816956]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...