public TaskCreated(TaskImpl task) {
this.task = task;
}
public void process() {
DbSession dbSession = Environment.getFromCurrent(DbSession.class);
HistoryTaskImpl historyTask = new HistoryTaskImpl(task);
dbSession.save(historyTask);
if (task.getSuperTask()!=null) {
HistoryTaskImpl superHistoryTask = dbSession.get(HistoryTaskImpl.class, task.getSuperTask().getDbid());
superHistoryTask.addSubTask(historyTask);
}
}