@Override
public List<GraphElement> getProcessHistory(final ProcessInstance pi) {
ProcessEngine processEngine = getProcessEngine(ProcessToolContext.Util.getThreadProcessToolContext());
HistoryService service = processEngine.getHistoryService();
HistoryActivityInstanceQuery createHistoryActivityInstanceQuery = service.createHistoryActivityInstanceQuery();
HistoryActivityInstanceQuery activityInstanceQuery = createHistoryActivityInstanceQuery.processInstanceId(pi.getInternalId());
List<HistoryActivityInstance> list = activityInstanceQuery.list();