HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, taskDbid);
if (historyTask==null) {
throw new JbpmException("task "+taskDbid+" doesn't exist");
}
HistoryCommentImpl comment = new HistoryCommentImpl(message);
historyTask.addDetail(comment);
dbSession.save(comment);
return comment;
}
}