[jboss-user] [jBPM] - How to Support/Enable Multi-threading in 5.1?

Bruce Cui do-not-reply at jboss.com
Sun Jun 26 04:13:21 EDT 2011

Bruce Cui [http://community.jboss.org/people/brucecui] created the discussion

"How to Support/Enable Multi-threading in 5.1?"

To view the discussion, visit: http://community.jboss.org/message/611994#611994

I'm looking to use jBMP5 to establish a series of backend batch processes, where multi-threading is one of the key elements. So when I found 5.0 did not support multi-threading, I was quite disappointed. But 5.1 gave me new hope. In the release announcement in the blog, I see the last enhanced feature is the support of multi-threading.

But but, I found the thing wasn't quite like what I expected when I actually tested an example. In this example, a sub-process is embedded in a Multi Instance node, the "wait for completion" flag of the sub-process set to "false", and the "independent" flag to "true". Within the sub-process, there is a sefl-defined service task prints a line out on every 10 seconds.

In my imagination, if multi-threading is fully supported, each round in the MultiInstance node should start one sub-process in a new thread and then move to the next round immediately. And the service task within each thread should print lines randomly. I think this is the essential meaning of the "wait for completion" flag.

But the reality is, the service tasks run one by one exactly, no matter how long I slept between line printings. This result upset me very much.. Before I found this, I was thinking of launching subsequent processes by one heading process, and each subsequent one could launch their own subsequent ones, and all of them could run in parallel. But now I feel it not quite possible.

I also did another testing with simple fork pattern. Again, unless I used timers in sub-paths, each path got executed exactly one by one no matter how many steps I put in each sub-path.

So here are my questions:
1. Am I wrong or 5.1 still doesn't support multi-threading?
2. If I'm wrong, which I hope the same, how can I enable the supporting of multi-threading in my processes? Or is there a fixed pattern I need to abide by to make this happen?

Looking forward to your kindly advise.

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110626/78ccbd6d/attachment.html 

More information about the jboss-user mailing list