Maybe there is a simple way, but here goes something:
This gives you the list of visited nodes (actuals and past)
List<NodeInstanceLog> nodeInstanceLogs = JPAProcessInstanceDbLog.findNodeInstances(new Long(processInstanceId));
Iterates and acquire Node objects
for (NodeInstanceLog nodeInstanceLog : nodeInstanceLogs) {
Node node = ((WorkflowProcess) process).getNode(Long.parseLong(nodeInstanceLog.getNodeId()));
// ie: this gives you x coordinate: node.getMetaData().get("x");
}
Hope this help.