Such as the below image. JBPM5 will generate a sub-process id, when the process instance reaches the Sub-Process Node.
How can i get the sub-process id with its parent process id?
By then way, i know that the code "ksession.getWorkItemManager().completeWorkItem(6, null);" can make a process instance on the move. But how can i get the workItem id with the process instance id, especially which process contains Sub-Process?