Hi Maciej,
There is an issue for what you said. Please refer this https://jira.jboss.org/browse/JBPM-2856.
In my opinion, when a sub process ended, we should delete it and signal the super process. So there will be no process with ended state in database. If you cannot find a process intance, it means that it has already ended.