I've looked at a lot of code of the Activiti engine, but I just can't get to understand the conceptual differences between Execution and ProcessInstance. Could anyone please elaborate how they are different and how they are related? This would be very helpful in our development with Activiti.
A processinstance is what is logically executed. The execution what is actually executed. An execution without a parent is a root execution and 'equal' to the processinstance (even in id). Each time e.g. A parallel gateway (fork) is encountered, an execution gets child executions which are e.g. 'joined' again at a next gateway.