jbpm FORK-JOIN分支中节点的并发执行
jbpm 中的默认 FORK 处理程序为流程中定义的每个转换(在 FORK 节点中)创建并发执行路径。 然而,它们不是并行执行的。
是否可以编写自定义 fork 处理程序,它启动单独的线程来运行每个 FORK-JOIN 分支? 这可能允许真正并发执行 FORK 中的各个分支。
The default FORK handler in jbpm creates concurrent execution paths for every transition defined in the process flow (in FORK node). However, they are not executed parallel fashion.
Is it possible to write custom fork handlers, which starts separate thread for running every FORK-JOIN branch? This might allow true concurrent execution various branches in FORK.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认的 jBPM fork 处理程序不实现“真正的”并发,但它确实实现了“业务并发”(即从业务角度来看它是并发的)。
您可以编写自己的 fork/join 实现...但我看到很多 Hibernate 乐观锁定/陈旧对象/...发生异常。
另一个问题是线程的寿命不长(即当数据库/服务器崩溃时),您需要重新创建、重新启动并将它们恢复到之前的状态。 考虑到默认的分叉开销是最小的,这一切看起来都很麻烦......
The default jBPM fork handler doensn't implement 'real' concurrency, but it does implement 'business concurrency' (ie from a business point of view it is concurrent).
You could write your own fork/join implementation ... but I'm seeing a lot of Hibernate optimistic locking/stale object/... exceptions happening.
Another problem is that the threads are not long-lived (ie when the DB/server crashes), and you need to recreate, restart and bring them back to the previous state. This all seems quite cumbersome, taking in account that the default fork overhead is minimal...