This is a short question with a really LOOONG answer - several pages long.
The answer depends on the database you're using, what transaction isolation you've specified, and, most importantly, the specific concurrency scenario you're thinking of.
To see what I mean about the scenario, consider the case you presented. The only record modified was the token. Under what conditions would another transaction be concurrently modifying the same token? Very few - the only one I can think of is some sort of intervention, like someone killing the process. I'm not sure, but I think I remember seeing specific code to deal with this concurrency scenario in JBPM.
So there's no general answer - only specific ones, which have to be considered in the context of the database and configuration.
There are some specific areas that are believed to be buggy (at least in some db/transaction/container configurations), dealing with:
- race conditions at join nodes
- race conditions at return from a subprocess
- race conditions with asynchronous agents trying to interact with a process instance soon after start - typically an MDB trying to interact with the process.
I believe these are being worked on.
Great summary Ed,
Ronald (on it's way from Petra to Distant Heat, a good reason for not being able to post some days :-) )
Thanks, stay cool, have fun!