AnsweredAssumed Answered

ProcessInstanceComments for list of tasks

Question asked by ivan_activiti on Oct 29, 2015
Latest reply on Nov 3, 2015 by martin.grofcik
I have a list of about 300 tasks that I display in a table. For each task a user can add comments (which are added to the process on the backend). When I retrieve the list of tasks to display, before rendering this list I iterate it and retrieve comments by using:

List<Comment> comments = taskService.getProcessInstanceComments(task.getProcessInstanceId(), "comment");

Then I display the number of comments for each row, so users know if there is a comment for a specific process. The problem is that the ACT_HI_COMMENT table now has over 350,000 rows and it keeps growing, so the comment retrieval for a list of 300 tasks takes close to a minute.

Is there a better way to accomplish this?