Jeff, if I understand correctly the difference between my installation and yours is that I
use the JMS system for async execution while you use the built-in database-based messaging
system.
For what it's worth, in my case I don't feel the need to use asynchronous
continuations because of parallel processing (the multithreading is done by the app server
and I can start multiple process instances in parallel) -- but because, having a series
of nodes that take a long time to execute, I need to have shorter, one-node transactions
so that in a web console I can have the status of the process. I only use async for
shorter transactions around each node and I must say that I would find it very useful if
jBPM did its database access behind a RequiresNew EJB (in "enterprise"
deployment). That would allow people to have long-taking series of nodes in non-async
processes.
Ok, as to the solution, I added an attribute to node :
| <node name="1st-slow-node" async="true"
async-priority="1">
| ...
| </node>
| <node name="2nd-slow-node" async="true"
async-priority="2">
| ...
| </node>
| <node name="3rd-slow-node" async="true"
async-priority="3">
| ...
| </node>
| <node name="4th-slow-node" async="true"
async-priority="4">
| ...
| </node>
|
and a field to Node.java :
protected int asyncPriority;
and the corresponding mapping to the Hibernate file.
When a Jms message is sent, its priority is sent using the node attribute.
I haven't checked, but I suppose this should work in your case too, by simply changing
the HQL query to do a join with Node and order by node.asyncPriority.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091225#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...