I think you have answered your own question. afaik, subprocesses are (currently) blocking. So get to the root token, get all child tokens and see if they have children left.
You can also create your own hibernate query to achieve this, but then you have to learn hibernate and have the albeit small) risk that your app wont work anymore if the db changes
if subprocesses are non-blocking, they don't need to be synchronized with the parent process and hence a parent-child link is not really necessary for the process execution.
you can have max 1 blocking subprocess that's why token has an optional reference to the subprocessinstance and not a collection of subprocessinstances.