I have a novice question.
At one stage of our a main process we need to wait for other process instances to finish. The trouble is, we haven't spawned those instances in our process and we don't know the processInstanceId's. We just know the instances will be of a specific type and will have specific values in their variables.
What are our options? I could only think of a HQL or SQL query on the database schema...
I believe a node type State is what you want to use. Then you could have the external process indicate that it is finished and cause a token.signal() to get your waiting process to resume. It briefly mentions that in the User Guide: http://docs.jboss.org/jbpm/v3/userguide/processmodelling.html#nodetypetaskstate.