The coordinates of nodes of a DiagramLayout object retrieved for calculating an overlay image for the current activities are sometime not correct.
See also the detailed explanation in http://forums.activiti.org/content/coordinates-nodes-diagram-layout-are-sometimes-not-correct-if-labes-are-attached-connections .
The problem is related to labels attached to connections which are involved in the calculation of the dimension of the diagram layout. The connection label coordinates may be sometimes negative leading to a wrong computation of the dimension of the diagram layout, which in turn leads to a wrong scaling factor that is used to calculate the actual coordinates of the activities.
The problem is located in the method org.activiti.engine.impl.bpmn.diagram.ProcessDiagramLayoutFactory.getDiagramBoundsFromBpmnDi(..) and can be fixed by calculating the absolute coordinates of retrieved connection labels instead of the relative coordinates.
I will try to provide a patch for the problem.