use of org.kie.kogito.process.workitem.Comment in project kogito-runtimes by kiegroup.
the class ProtobufProcessInstanceReader method buildComment.
private Comment buildComment(KogitoWorkItemsProtobuf.Comment comment) {
Comment result = new Comment(comment.getId(), comment.getUpdatedBy());
result.setContent(comment.getContent());
result.setUpdatedAt(new Date(comment.getUpdatedAt()));
return result;
}
use of org.kie.kogito.process.workitem.Comment in project kogito-runtimes by kiegroup.
the class HumanTaskHelper method deleteComment.
public static boolean deleteComment(KogitoWorkItem item, Object id, String user) {
Map<Object, Comment> comments = asHumanTask(item).getComments();
Comment comment = comments.get(id);
if (comment == null || !comment.getUpdatedBy().equals(user)) {
return false;
}
return comments.remove(id) != null;
}
Aggregations