Your use case is, in practice, Van der Aalst's deferred choice pattern. I found it interesting and worked it out. Take a look in the jBPM Wiki for the solution I found.
Thanks a lot, today i've been pretty busy developing and i did that a little different: i have 1 timer and 2 actors in a node (each with a task) and i want to keep on the flow as soon as timer expires or any of the actors perform his action. I set a default transition for all to a nop (just like you) node and i set the attribute properties of the task-node to first-wait and end-tasks=true. I order to avoid being visible this to-nop transition i modified the taskbean bean not to show (represent with buttons some transitions to the user) according to a rule i made. I'm glad to see we are on the same wave. What should i do to colaborate with the project? Slowly i start loving jbpm :)
Neat, I overlooked the end-tasks attribute. I just applied your suggestion and the tests pass. However, if you see the log, you will notice there is a problem in the timeout scenario. Ending the tasks (by virtue of end-tasks="true") results in the token taking the default transition. After that, the timer pushes the token through the timeout transition. In total, the task node is left three times :-(
I attached the updated project to the wiki page. I like the way the process definition looks now, but the behavior is incorrect. When the node is left as a result of the user ending a task, jBPM does not signal again as the remaining tasks are ended. When the node is left as a result of a timeout, jBPM signals each time it ends one of the remaining tasks.
We'd really appreciate your help to determine the cause of this anomalous behavior and how to fix it. Also, please explain how you modified the JSF bean not to show the timeout transition in your other post.
I've just noticed you are right and the token leaves the node 3 times, but does it represent a problem or a serious mistake? I think this way it just works and for the statistics (i'll have to make in the future) it does not affect since only the no-default nodes are taken (acept/cancel) when an action happens. I believe that jBPM shouldn't, by auto-ending the tasks automatically, propagate the token, i don't know what you think. Can it be a future improvement of jBPM to stop the flow of the by the system ended tasks?
What would be super would be to be able to assign a task to 2 users, so we weren't speaking about this now :)
About the jsf and the transition, i just removed from the available transitions those starting with _ (for example). If you want, i can share the code but it's nothing really special.
I'd be interested in collaborating in the development of jBPM, what should i do?