private void writeHistoryData(List<HashMap<String, Object>> output, ExecutableFlow history) {
HashMap<String, Object> data = new HashMap<String, Object>();
data.put("scheduleid", history.getScheduleId());
Project project = projectManager.getProject(history.getProjectId());
data.put("flowname", history.getFlowId());
data.put("projectname", project.getName());
data.put("time", history.getStartTime());
data.put("period", "0");
long endTime = history.getEndTime();
if(endTime == -1){
endTime = System.currentTimeMillis();
}
data.put("length", endTime - history.getStartTime());
data.put("history", true);
data.put("status", history.getStatus().getNumVal());
output.add(data);
}