-
1. Re: Concurrent childnodes: how to create multithreaded nodes
kukeltje Jun 23, 2008 10:55 AM (in response to rasun)PVM and jBPM are no threadmanagers. concurrency has to be achieved by making the actions in the childnodes async and processed in parallel by other mechanisms (e.g. jms or more simple in the jobscheduler). This all is in the docs.
-
2. Re: Concurrent childnodes: how to create multithreaded nodes
rasun Jun 24, 2008 7:29 AM (in response to rasun)Thanks for your reply.
Still I keep asking myself; if the docs mention concurrency amongst processes and it is possible to use forks (like forEachForkActionHandler), which look like they are based on the same principle (of using concurrency/threads), then why not having the option of creating threaded forks/transitions?
I mean, if a fork splits in three transition/nodes that can be executed parallel and join into one node finally, then that would be quit a nice feature if it were implemented in jBPM, not? -
3. Re: Concurrent childnodes: how to create multithreaded nodes
kukeltje Jun 24, 2008 8:30 AM (in response to rasun)no it would not. The reason is quite simple... threadmanagement is not allowed in JEE and JEE has way better options to do things async (building your own configurable threadmanager with pooling etc is quite difficult). For plain tasks jBPM works fine but for longer running actions or parallel running actions use the jBPM async option that makes use of jms or the jobscheduler (which is a kind of basic threadmanager)
-
4. Re: Concurrent childnodes: how to create multithreaded nodes
kukeltje Jun 24, 2008 8:31 AM (in response to rasun)so concurrent paths of execution != multiple threads
-
5. Re: Concurrent childnodes: how to create multithreaded nodes
rasun Jun 25, 2008 3:10 AM (in response to rasun)Thanx for your info, I'm gonna check out the docs about the jBPM option and see whether I can make something out of it ;).
Else, I just implement a simple Threadable node to spawn threaded childnodes and hope jBPM will be able to cope with it. -
6. Re: Concurrent childnodes: how to create multithreaded nodes
kukeltje Jun 25, 2008 5:08 AM (in response to rasun)"Rasun" wrote:
Else, I just implement a simple Threadable node to spawn threaded childnodes and hope jBPM will be able to cope with it.
Hmm... I'd strongly advise against this. Many other issues can arise since jBPM was not developed to be used in this way. Might be very difficult to get any help in these circumstances, certainly if it is known by other people in this forum that jBPM is used in a 'wrong' way. -
7. Re: Concurrent childnodes: how to create multithreaded nodes
rasun Jun 27, 2008 5:03 AM (in response to rasun)Though your vision might be just and correct, I managed to implement it as a simple app: I defined one class which creates threadable processes. Each process that has to be started will be fired as a new thread. This works quite safe as each new thread starts a new execution, though it isn't within the main process anymore. The basic idea was to create 'subprocesses' (splitted multiple transitions/nodes that work on a specific task and then merge into one node afterwards). As I want to keep the whole thing plain simple, I won't make use of Hibernate, databases or Job Executor. So I guess I'm forced to create my own implementation then.
Perhaps in the future, someday a simple fork will be available where each splitted transaction is a thread just for one transition :).
Thanks for your input anyway!