TaskInstances in the processInstance when it is already running,
Yes, you can use the jbpm API. See the unittests for 'examples'. Runtime adding tasks to processinstances does not change the processdefinition (and thus they will not show up in the console images)
how jbpm keeps coherence between the processDefinition and the processInstance.
That is already done when creating the PI (and see previous answer)
And what would happen with a TaskInstance inserted between two completed tasks? The token returns to the last not completed TaskInstance? Another question: Is there any way to create the processDefinition based on the processInstance?
Can you give some idea how you created ProcessInstance by code.I've strucked here.Please help